coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: yoshikiwei on December 07, 2004, 11:07:09 AM

Title: lastalb sql problem
Post by: yoshikiwei on December 07, 2004, 11:07:09 AM
SELECT *,max({$CONFIG['TABLE_PICTURES']}.ctime) as maxctime,{$CONFIG['TABLE_ALBUMS']}.title AS title,{$CONFIG['TABLE_ALBUMS']}.aid AS aid  FROM {$CONFIG['TABLE_PICTURES']},{$CONFIG['TABLE_ALBUMS']} WHERE {$CONFIG['TABLE_PICTURES']}.aid = {$CONFIG['TABLE_ALBUMS']}.aid AND approved = 'YES' $ALBUM_SET GROUP  BY {$CONFIG['TABLE_PICTURES']}.aid ORDER BY maxctime DESC $limit

The above is my sql used in "lastalb" (last updated album)
It correctly displayed the list of last updated album
However, the thumbnail used is the first picture as arranged alphabetically

What i wanted is, to show the thumbnail of the last uploaded picture of that last uploaded album

Anyone can suggest a sql to do that ?
Title: Re: lastalb sql problem
Post by: lordprodigy on February 25, 2005, 08:02:44 PM
i have a similar question. I want the albums to use the same thumbnail which I specified in the album preferences, from the drop down menu. Anyone, any ideas?

thanks!

Title: Re: lastalb sql problem
Post by: Joachim Müller on February 26, 2005, 02:19:56 PM
don't try to hijack other's questions. Your question differs from what yoshikiwei was requesting.

Joachim
Title: Re: lastalb sql problem
Post by: lordprodigy on February 28, 2005, 04:47:02 PM
Sorry Joachim. I thought my problem shares a similar solution like his.