The sql is simple like: SELECT artist_id FROM artists WHERE display_online = '1' ORDER BY artist_id ACS The statement works fine in phpMyAdmin and from the command line, but not from my script, which uses PEAR::DB. It's as if PEAR just omitted the ORDER BY statement. Tony On 3/13/07 5:24 PM, "Chris" <dmagick@xxxxxxxxx> wrote: > Tony Grimes wrote: >> I have this page that lists artists alphabetically: >> >> http://www.wallacegalleries.com/artists.php >> >> At least it did until today. Nobody made any changes to the files, but the >> database stopped sorting by artist_id. The list shown is just the default >> order that mysql spits out if the SORT BY clause is omitted (as if I clicked >> 'browse' in phpMyAdmin). > > Right. All databases do exactly the same thing. There are no guarantees > about sorting unless you tell it exactly how to sort. > >> The SQL works in phpMyAdmin, and the site uses PEAR::DB. We patched the >> server last week, but the problem showed up this morning. > > What sql? With an order by? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php