View Single Post
Old 20-05-2007, 12:47   #3 (permalink)
gk
geek
 
gk's Avatar
 
Join Date: Oct 2006
Location: *.everywhere
Posts: 204
Send a message via ICQ to gk Send a message via AIM to gk Send a message via MSN to gk Send a message via Yahoo to gk
PHP Code:
$rs=mysql_query('SELECT * FROM table_name WHERE id IN (0,1,2,3,10)');
while(
$row=mysql_fetch_assoc($rs)){
//do stuff
echo "At row $id<br />\n";


The where will cause the statement to only select rows with ids of 0,1,2,3 and 10 rows 4,5,6,7,8 and 9 are all skipped.
__________________
Quote:
"Why reinvent the wheel"? Simply because it's not round enough and I don't like the treads.
  Reply With Quote