RE: [PHP] mySQL SQL query

From: Date: Thu, 05 Aug 2004 13:48:01 +0000
Subject: RE: [PHP] mySQL SQL query
Groups: php.general 
Request: Send a blank email to php-general+get-192857@lists.php.net to get a copy of this message
[snip] [snip] A quickie for you: How do I say SELECT * FROM mytable where the sum of this field + this field + this field < x I can't say I've done one of those before. [/snip] How many SQL queries can a PHP list handle in a day? More than the MySQL list! Hahahahahaha! SELECT a + b + c and myTotal FROM myTable HAVING myTotal < x [/snip] Sorry, syntax errors.... SELECT a + b + c AS myTotal FROM myTable HAVING myTotal < x you can also do this SELECT (SUM(foo) + SUM(bar)) AS myTotal FROM myTable GROUP BY thisThing HAVING myTotal < x

« previous php.general (#192857) next »