RE: [PHP] comparing

From: Date: Sat, 15 Sep 2001 08:18:09 +0000
Subject: RE: [PHP] comparing
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-67440@lists.php.net to get a copy of this message
How about; SELECT product, count(*) AS Total FROM table GROUP BY product ORDER BY total DESC > -----Original Message----- > From: Teqila MAN [mailto:teqilaman@poczta.wp.pl] > Sent: Saturday, 15 September 2001 16:43 > To: php-general@lists.php.net > 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: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#67440) next »