Re: ? Sort by a summation of columns ?

From: Date: Sat, 25 Nov 2000 11:43:55 +0000
Subject: Re: ? Sort by a summation of columns ?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-4734@lists.php.net to get a copy of this message
btw, this is in MySQL -- ----------------- The DevBoard - http://www.thedevboard.com ----------------- http://www.alladvantage.com/go.asp?refid=BIY971 - AllAdvantage ""Noah Spitzer-Williams"" <noahsw@cyberdude.com> wrote in message news:8vpimo$fr0$1@toye.p.sourceforge.net... > I have a database setup as follows: > > some fields... | v1 | v2 | v3 | v4 | v5 > some fields... | v1 | v2 | v3 | v4 | v5 > some fields... | v1 | v2 | v3 | v4 | v5 > > > how can i retrieve a list of these rows sorted by the sum of v1 + v2 + v3 + > v4 + v5? > > for instance, can i do like : ORDER BY sum(v1,v2,v3,v4,v5)? > > - Noah > > -- Thanks! > > ----------------- > The DevBoard - http://www.thedevboard.com > ----------------- > http://www.alladvantage.com/go.asp?refid=BIY971 - AllAdvantage > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.db (#4734) next »