sorting after a: AS example column
| From: | andy | Date: | Thu, 09 May 2002 09:25:30 +0000 |
| Subject: | sorting after a: AS example column | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-19069@lists.php.net to get a copy of this message | ||
Hello,
I am wondering if it would be possible to sort after a column which does not
exist in a mysql db.
Example:
SELECT test AS example
FROM data
WHERE example != 0
this returns an error: "unknown column example"
Is there a way?
And what about this statement:
SELECT d.test AS example
FROM data d, super s
ORDER BY example
The querry runns fast as soon as I leave out the ORDER BY clause, but slows
down with the ORDER statement.
Is it possible to name the thing like: ORDER BY d.example?
Thanx for your help guys,
Andy