About querying the MySQL field and outputting 
Table A: 
 
Idtitle 
--------------------------------- 
10 Testing 
11 Hello 
12 Very good 
13 Very good 
 
PHP Output: 
 
 
 
   PHP Code 
    
   $test [' title '] = Array (' MD ' = ' test '), Array (' MD ' =  ' hello '), Array (  ' md ' = = ' very good '),  Array ( ' MD ' = ' very good '); 
 
Ask if you want to query the MySQL database, there are "testing, hello, very good, very good" 
the ID value, how should MySQL query statements be written? Similar: 
 
 
   SQL Code 
    
   SELECT * from A where a.title = "Test" or a.title = "Hello" or a.title = "very good" or a.title = "very good" limit 0,10
 
 
Such a query statement, such a statement can only list matching data in the database, I just want him to output the ID field, what should I do? 
 
------Solution-------------------- 
SELECT * from A where a.title in (' Test ', ' hello ', ' good ', ' very good ') limit 0,10 
 
------Solution-------------------- 
It's easier to use PHP output. 
1. Connect to the database. 
2. Execute Select 
3.mysql_fetch_array 
The following is not a fight. ..... Own Google is more than 
------Solution-------------------- 
Although you are not in, but I still write, points to me: 
$sql = "Select Id,title from A where title in (' Test ', ' hello ', ' good ', ' very good ') limit 0,10"; 
$link = mysql_connect (' 127.0.0.1 ', ' mysql_user ', ' Mysql_password '); 
if (! $link) { 
Die (' Could not connect: '. Mysql_error ()); 
} 
mysql_select_db ("Mysql_database", $link); 
mysql_query ("Set names UTF8"); 
$res = mysql_query ($sql); 
while ($info = Mysql_fetch_assoc ($res)) { 
echo "title". $info [' title ']. " The ID number is ". $info [' id ']." 
"; 
} 
Over; Remember to give points!!