lastalb sql problem lastalb sql problem
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

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.