title: How to delete multiple rows from MYSQL table using PHP
body: <p>I'm trying to learn php and ran into a problem.  I'd appreciate any help.</p>
  
  <p>I have a database that looks like:</p>
  
  <pre><code>ID USER  AGE
  1  name1 18
  2  name2 19
  3  name3 20
  etc etc
  </code></pre>
  
  <p>I want to delete multiple records.  This is the code I am using for that:</p>
  
  <pre><code>&lt;?php
  $username = "root";
  $password = "";
  $hostname = "localhost"; 
  
  //connection to the database
  $dbhandle = mysql_connect($hostname, $username, $password) 
   or die("Unable to connect to MySQL");
  echo "Connected to MySQL&lt;br&gt;";
  
  //select a database to work with
  $selected = mysql_select_db("photo",$dbhandle) 
    or die("Could not select examples");
  
  //execute 
  echo "CONNECTED";
  echo "&lt;/br&gt;";
  
  //Action
  $delete_query = ("DELETE FROM _users WHERE age in(17,18,19)");
  
  $result = mysql_query($delete_query);
  
  echo 'Deleted';
  
  mysql_close($dbhandle);
  ?&gt;
  </code></pre>
  
  <p>When I am deleting by querying the age column, it deletes multiple rows okay.</p>
  
  <p>However, when I do this:</p>
  
  <pre><code>$delete_query = ("DELETE FROM _users WHERE USER in(name1,name2,name3)");
  </code></pre>
  
  <p>Nothing happens. Is it because those are strings?  How can I fix it?</p>
  
  <p>Thanks! </p>