title: insert json string into mysql
body: <p>I want to store json string in mysql db. 
  But seems there is some quotation issue, I can't figure out.</p>
  
  <pre><code>use DBI;
  use JSON;
  
  #some staff
  
  my $json_string = encode_json \%DB;
  
  #DBI CONNECTION...
  
  # insert data into the links table
  my $sql = "INSERT INTO `tech_nodes` (`meta`).
      VALUES(?)";
  my $stmt = $dbh-&gt;prepare($sql);
  $stmt-&gt;bind_param(1, $json_string );
  
  # execute the query
  $stmt-&gt;execute();
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>DBD::mysql::st execute failed: You have an error in your SQL syntax;
    check the manual that corresponds to your MySQL server version for the
    right syntax to use near '.
            VALUES('{\"techs\":{\"A\":{\"B\":null,\"techs\":{\"stack.tc'
    at line 1 at ./stacks.pl line 121. DBD::mysql::st execute failed: You
    have an error in your SQL syntax; check the manual that corresponds to
    your MySQL server version for the right syntax to use near '.
            VALUES('{\"techs\":{\"A\":{\"B\":null,\"techs\":{\"stack.tc'
    at line 1 at./stacks.pl line 121.</p>
  </blockquote>
  
  <p>Table description:</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `tech_nodes` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `meta` MEDIUMTEXT NOT NULL,
    `generated_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
  </code></pre>