MySQL sort stopped working
MySQL sort stopped working
am 13.03.2007 20:22:25 von Tony Grimes
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).
The SQL works in phpMyAdmin, and the site uses PEAR::DB. We patched the
server last week, but the problem showed up this morning.
Anyone have any ideas on what could be causing this?
Thanks in advance,
Tony
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: MySQL sort stopped working
am 13.03.2007 20:25:27 von Bastien Koert
too small a sort space on the server? have you checked the server config?
Bastien
>From: Tony Grimes
>To: PHP-DB
>Subject: [PHP-DB] MySQL sort stopped working
>Date: Tue, 13 Mar 2007 13:22:25 -0600
>
>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).
>
>The SQL works in phpMyAdmin, and the site uses PEAR::DB. We patched the
>server last week, but the problem showed up this morning.
>
>Anyone have any ideas on what could be causing this?
>
>Thanks in advance,
>Tony
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
____________________________________________________________ _____
Have Some Fresh Air Fun This March Break
http://local.live.com/?mkt=en-ca/?v=2&cid=A6D6BDB4586E357F!1 47
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: MySQL sort stopped working
am 14.03.2007 00:24:40 von dmagick
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?
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: MySQL sort stopped working
am 14.03.2007 05:46:19 von Tony Grimes
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" 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