title: MySQL Query Syntax - works in phpMyAdmin but not on page
body: <p>Here is my <code>users</code> table:</p>
  
  <pre><code>uid (main) | username  | password
      1      | Admin     | "(actual password removed)"
      2      | Dummy     | "(another password removed)"
  </code></pre>
  
  <p>My MySQL query is the following:</p>
  
  <pre><code>SELECT * FROM `users` WHERE username = "Admin"
  </code></pre>
  
  <p>And my php code looks like this:</p>
  
  <pre><code>$con=@mysqli_connect("localhost","root","root","database");
  $sql='SELECT * FROM `users` WHERE username = "Admin"';
  mysqli_prepare($con, $sql);
  mysqli_query($con, $sql);
  mysqli_close($con);
  </code></pre>
  
  <p>If I run this code in phpMyAdmin, then it returns the first row successfully, however if I run it from my php page, I get the following error:</p>
  
  <pre><code>Fatal error: Problem preparing query (SELECT * FROM `users` WHERE username = "Admin") 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 '"Admin"'
  </code></pre>
  
  <p>I don't get what is the difference...</p>