not exactly clear on what you want, but if you want to see what you have
most, you could do a count(id) where product='cola' and compare that to a
count(id) where product='cd'

jack

-----Original Message-----
From: Teqila MAN [mailto:[EMAIL PROTECTED]]
Sent: Saturday, September 15, 2001 3:13 AM
To: [EMAIL PROTECTED]
Subject: [PHP] comparing


Hello,

 What is the simple mod to compare values for example. (we have a mysql tabl
e)

id ------  product
1    -        cola
2   -        cola
3  -         cd
4   -        cd
5 -         cola

How to make a mysql query that wokuld print me what products i have in most.

Teqilaman


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to