title: SQL Syntax error using WEHERE
body: <pre><code>$query = sprintf("SELECT * FROM sorular WEHERE test_id='%s' ORDER BY id LIMIT '%s', '%s'",
  mysql_real_escape_string(htmlentities(stripslashes($testid))), 
  mysql_real_escape_string(htmlentities(stripslashes($start))), 
  mysql_real_escape_string(htmlentities(stripslashes($perpage))));
  </code></pre>
  
  <p>and I am getting error:</p>
  
  <blockquote>
    <p>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 'test_id='1' ORDER BY id LIMIT '4', '2'' at line 1 </p>
  </blockquote>