to select range of id from table

kalaid's Avatar
Light Poster
Hi,
how do you choose a range of ID from a db?

I used query to select record matched with particular id
$data = mysql_query("SELECT * FROM table_name WHERE (id=2)")

I tried like above query to select record with id's 2 through 9
$data = mysql_query("SELECT * FROM navydb WHERE (1<id<9)")

it didnt work. Help me
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Duplicate of to select range of id from table. Thread closed.