Advanced search  

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]

Pages: [1]   Go Down

Author Topic: lastalb sql problem  (Read 2916 times)

0 Members and 1 Guest are viewing this topic.

yoshikiwei

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Posts: 68
lastalb sql problem
« on: December 07, 2004, 11:07:09 am »

Code: [Select]
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 ?
Logged

lordprodigy

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 228
    • B514 ///
Re: lastalb sql problem
« Reply #1 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!

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: lastalb sql problem
« Reply #2 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
Logged

lordprodigy

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 228
    • B514 ///
Re: lastalb sql problem
« Reply #3 on: February 28, 2005, 04:47:02 pm »

Sorry Joachim. I thought my problem shares a similar solution like his.
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 15 queries.