Re: Use of 'as' name in where sub-clause
| From: | dpgirago at mdanderson dot org | Date: | Wed, 01 Dec 2004 16:27:07 +0000 |
| Subject: | Re: Use of 'as' name in where sub-clause | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-37507@lists.php.net to get a copy of this message | ||
Ross,
> If someone can give me a good reason why this is so, it will stop it
> annoying me so much.
From the MySQL manual for version 4.0.16:
It is not allowed to use a column alias in a WHERE clause, because the column value may not yet be
determined when the WHERE clause is executed. See section A.5.4 Problems with alias.
I didn't check section A.5.4, but it probably gives a more detailed
explanation.
dave