snarlydwarf;445817 Wrote:
>
> What it is mad about is much simpler: it says there is no column called
> 'year' in the albums table.
>
> Which means something somewhere in the db initializing went horribly
> wrong: there should be a 'year' column.
>
There is a year in albums, but the albums table is aliased as "album"
(instead of "albums") in the query so I believe the order by should be
"ORDER BY album.year" instead of "ORDER BY albums.year".
However, it's still strange because my setup still generates a correct
query that looks like this:
Code:
--------------------
SELECT album.id, album.titlesort, album.contributor, album.compilation,
album.year, album.artwork, album.disc, album.discc, album.musicmagic_mixable,
album.titlesearch, album.replay_gain, album.replay_peak, album.musicbrainz_id,
album.title FROM contributors me
LEFT JOIN contributor_album contributorAlbums ON
contributorAlbums.contributor = me.id
JOIN albums album ON album.id = contributorAlbums.album
WHERE
( me.id = ? )
GROUP BY album.id
ORDER BY album.year,
concat('0', me.namesort),
concat('0', album.titlesort)
LIMIT 1
--------------------
--
erland
Erland Isaksson
'My homepage' (http://erland.isaksson.info) (Install my plugins through
Extension Downloader)
(Developer of 'TrackStat, SQLPlayList, DynamicPlayList, Custom Browse,
Custom Scan, Custom Skip, Multi Library, Title Switcher and Database
Query plugins'
(http://wiki.erland.isaksson.info/index.php/Category:SlimServer))
------------------------------------------------------------------------
erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
View this thread: http://forums.slimdevices.com/showthread.php?t=66307
_______________________________________________
beta mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/beta