title: PHP MYSQL Error, Invalid query (but its not invalid)
body: <p>I'm running into a bit of a problem and I can't figure out how to fix it</p>
  <p>PHP Code using</p>
  <pre><code>$date = mysql_real_escape_string(date(&quot;Y/m/d&quot;));
  $title = mysql_real_escape_string($_POST[&quot;title&quot;]);
  $post = mysql_real_escape_string($_POST[&quot;post&quot;]);
  $sql =  printf(&quot;INSERT INTO `modcraft_mods`.`news` (`date`, `title`, `poster`, `post`) VALUES ('%s', '%s', '%s', '%s');&quot; , $date, $title, mysql_real_escape_string($user-&gt;data['username']), $post);
  $result = mysql_query($sql);
  if (!$result) {
      die('Invalid query: ' . mysql_error());
  }
  </code></pre>
  <p>Output:</p>
  <blockquote>
  <p>INSERT INTO modcraft_mods.news (date, title, poster, post) VALUES ('2011/09/19', 'Test Title', 'PixelMaster', 'Test Post');</p>
  <p>Invalid query: 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 '151' at line 1</p>
  </blockquote>
  <p>The weird this is that I ran the query in PhPMyAdmin and it worked fine... Does anyone know what could cause this?</p>