Re: SQL order by queries

From: Date: Sat, 27 Jul 2002 04:37:19 +0000
Subject: Re: SQL order by queries
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-20832@lists.php.net to get a copy of this message
On Saturday 27 July 2002 15:03, Georgie Casey wrote: > Can you d arithmetic division on two fields in an ORDER BY?? > > eg > SELECT * FROM table_name ORDER BY field1 / field2 DESC > > Can it be done? Try: SELECT *, (field1 / field2) AS doo FROM table_name ORDER BY doo DESC -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* "I'm willing to sacrifice anything for this cause, even other people's lives." */

« previous php.db (#20832) next »