Querying the database?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Yourchild
Forum Newbie
Posts: 16
Joined: Mon Jul 30, 2007 3:04 pm

Querying the database?

Post by Yourchild »

I thought I'd ask the question here, since many of php-ers are familiar with mysql techniques.

I have a data table as follows:

Code: Select all

 
messageID    |      message           
---------------------------   
1                       "hi"        
2                       "hello"    
3                       "apple"   
4                       "orange"
5                       "banana"
6                       "grape"
 

I want to select 'hello, apple, orange, banana' only.

How do I write the query for this? I have a hold of the first messageID of the output, which is 2 (hello). How can I use this in my query?

Please help.
Yourchild
Forum Newbie
Posts: 16
Joined: Mon Jul 30, 2007 3:04 pm

Re: Querying the database?

Post by Yourchild »

ummm nevermind i have the answer thanks for reading. :roll:
User avatar
Sindarin
Forum Regular
Posts: 521
Joined: Tue Sep 25, 2007 8:36 am
Location: Greece

Re: Querying the database?

Post by Sindarin »

Please include the answer if a topic is solved, that way we can make use of it, as well. :wink:
Post Reply