Forum Moderators: coopster

Message Too Old, No Replies

Sorting Information

         

neroag

9:49 am on Jul 30, 2005 (gmt 0)

10+ Year Member



Hello All

I have a script that completes a mysql query and displays all the information & all works fine

The problem im having is that i only want it to display the information i tell it too ie...

there are 3 people with an age of 40 and the rest with various other ages, can someone point me in the right direction to get the script to display only those who are 40 & ignore the rest

many thanx

dreamcatcher

10:05 am on Jul 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi neroag,

Something like this is what you want:

SELECT * FROM table WHERE age = '40'

Check out the MySQL manual for more information:
[dev.mysql.com...]

dc

neroag

10:39 am on Jul 30, 2005 (gmt 0)

10+ Year Member



Hi dreamcatcher
Thanx for that, just out of interest is there a way to also extract another piece of information at the same time sommit like...
SELECT * FROM table WHERE age = '40' & WHERE firstname = "Andy"

Thanx again

ymasood

10:44 am on Jul 30, 2005 (gmt 0)

10+ Year Member



Neroag,

That would be:

SELECT * FROM table WHERE age = 40 AND firstname = 'Andy'

Rgds,

YM

neroag

10:51 am on Jul 30, 2005 (gmt 0)

10+ Year Member



Thank you both Much appreciated again

Thanx

dreamcatcher

3:28 pm on Jul 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No problem, glad we could help. You might want to download a copy of the MySQL manual or look at some SQL tutorials to get the hang of some of the syntax.

dc