Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Programming/Scripts

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11th December 2009, 16:04
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,045
Thanks: 270
Thanked 154 Times in 133 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
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Newly Installed ISPConfig3 on Ubuntu 8.04 : login redirect fail ? cripperz Installation/Configuration 5 22nd March 2009 13:15
add web site serr57 Installation/Configuration 18 13th April 2008 12:40
php eating cpu shajazzi Server Operation 15 15th August 2007 02:19
Virtual Hosting Not Working stirfry Installation/Configuration 26 7th August 2007 11:53
VirtualHosts marra87 General 9 12th September 2006 05:09


All times are GMT +2. The time now is 00:54.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.