View Single Post
  #1  
Old 11th December 2009, 15:04
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,033
Thanks: 261
Thanked 147 Times in 128 Posts
Unhappy PHP: Show 3 records from MySQL (exampel: ID: 5 22 87)

I'm feeling so stupid at the moment, but what's the best way to get MySQL to show lets say 3 records.

Example: I want to show record ID 5, 22 and 87 in on go.

Sure I can do a query loop on each record like this
Code:
$query_rsFiles = "SELECT * FROM products WHERE `ID` = '$the_ID'";
or get MySQL to do a query on all records , and when the ID is 5 or 22 or 87 are up to show the data, but this looks like a long and not proper way to do it.

Anyone here who might know the correct way of doing this?

Once again.. Sorry for asking this... I know.. I should know things like this.
Reply With Quote
Sponsored Links