I have to say, this is BUGGING THE HELL OUT OF ME. I don't understand
OO database coding at all! Of course, it doesn't help that I only know
enough perl to be a danger to myself and to anyone in my immediate
vicinity.
KDF is right that, in some ways, this is a MySQL bug. But the MySQL
bug is getting triggered only because SC's OODB code is tacking an
entirely useless "GROUP BY me.id" clause into the query that fetches
the genre names. GROUPing by an id column's unique values is straight
out of the Department of Redundancy Department, isn't it? Eliminate
that useless clause and this bug goes away.
>From the server log with sql logging on:
Bad genre query:
Code:
--------------------
SELECT me.id, me.name, me.namesort, me.namesearch, me.musicmagic_mixable FROM
genres me GROUP BY me.id ORDER BY me.namesort LIMIT 36;
--------------------
..which returns results that aren't ordered by namesort.
I don't have a FRIGGING clue as to where to even begin to look in the
code to get rid of that "GROUP BY" clause. If I did, the correct sql
would look like this:
Code:
--------------------
SELECT me.id, me.name, me.namesort, me.namesearch, me.musicmagic_mixable FROM
genres me ORDER BY me.namesort LIMIT 36;
--------------------
..which returns the correct results in the right order.
--
gharris999
------------------------------------------------------------------------
gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115
View this thread: http://forums.slimdevices.com/showthread.php?t=49737
_______________________________________________
beta mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/beta