Grouping functions inside WHERE clause - may or not
| From: | Ventsyslav Vassilev | Date: | Sat, 04 Aug 2001 15:59:52 +0000 |
| Subject: | Grouping functions inside WHERE clause - may or not | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-11059@lists.php.net to get a copy of this message | ||
Hi,
My simple question is:
May i use grouping functions in the WHERE clause of a SQL query in mySQL?
For example, this failed to work:
SELECT date_field FROM tablename WHERE date_filed BETWEEN MIN(date_field)
AND MAX(date_field);
In the mySQL manual i red the following into "Functions to use in SELECT and
WHERE clauses/Comparision operators" section:
"If expr is a TIMESTAMP, DATE, or DATETIME column, MIN() and MAX() are
formatted to the same format if they are constants."
What this means?
may i use min()/max() into WHERE or not?
Pls help!
--
________________________________
Ventsyslav Vassilev
Comel Soft Multimedia
Sofia, Bulgaria
ICQ UIN: 11199819
e-mail: wency@comelsoft.com