Re: [PHP] sorting via PHP or MySQL?

2007-05-13 Thread Richard Lynch
On Thu, May 10, 2007 1:00 pm, James Tu wrote: (I've cross posted at the MySQL list as well) Here's an example with a simple table: describe collection; +--+-+--+- +-++ | Field| Type

RE: [PHP] sorting via PHP or MySQL?

2007-05-10 Thread Brad Fuller
James Tu wrote: (I've cross posted at the MySQL list as well) Here's an example with a simple table: describe collection; +--+-+--+- +-++ Field| Type| Null | Key | Default

Re: [PHP] sorting via PHP or MySQL?

2007-05-10 Thread Robert Cummings
On Thu, 2007-05-10 at 14:00 -0400, James Tu wrote: (I've cross posted at the MySQL list as well) Here's an example with a simple table: describe collection; +--+-+--+- +-++ | Field| Type

Re: [PHP] sorting via PHP or MySQL?

2007-05-10 Thread Larry Garfield
A somewhat more extensible version of the 1 query method: http://www.garfieldtech.com/blog/php-group-by If you will only ever have 2 values there, then either method is probably fine. The php group by method (above) is more extensible if you're going to have a variable or arbitrary number of