RE: [PHP-DB] max() and min()

From: Date: Thu, 29 Jun 2000 16:12:09 +0000
Subject: RE: [PHP-DB] max() and min()
Groups: php.db 
Request: Send a blank email to php-db+get-750@lists.php.net to get a copy of this message
You are missing a group by clause in your statement. select name, id, max(price) from pro where subtypes like '%sb%' group by name, id order by name; That should do it. CJ "No other personal quality contributes to success more than relentless persistence in the pursuit of one's goals." -----Original Message----- From: sarahana [mailto:sarahana@scournepal.com] Sent: Thursday, June 29, 2000 11:56 AM To: php-db@lists.php.net Subject: [PHP-DB] max() and min() In the manual it says that you can use max() and min() even with where clauses, right? How come "select name, id, max(price) from pro where subtypes like '%$sb%' order by name" doesn't work? "price" field exists, btw. Thanks. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#750) next »