lastalb sql problem lastalb sql problem
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

lastalb sql problem

Started by yoshikiwei, December 07, 2004, 11:07:09 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

yoshikiwei

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 ?

lordprodigy

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!


Joachim Müller

don't try to hijack other's questions. Your question differs from what yoshikiwei was requesting.

Joachim

lordprodigy

Sorry Joachim. I thought my problem shares a similar solution like his.