title: User-defined variable in an INSERT query for MySQL
body: <p>I need to use user-defined variable in an INSERT query for MySQL, see an example bellow:</p>
  
  <pre><code>INSERT INTO `posts`(`id`) VALUES(NULL);
  SET @last_insert_id = LAST_INSERT_ID();
  INSERT INTO `comments`(`id`, `post_id`) VALUES(NULL, "@last_insert_id");
  </code></pre>
  
  <p>This example doesn't work and inserted 0. What am I doing wrong?</p>