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: When disabeling query that fetch album stats i loose all the "album thumbnails"  (Read 2328 times)

0 Members and 1 Guest are viewing this topic.

dke

  • Guest

hi all,

i had a thread going last night about optimizing my index.php loadtime, all seemed fine when i disabeled the code

$sql = "SELECT a.aid, count( p.pid )  AS pic_count, max( p.pid )  AS last_pid, max( p.ctime )  AS last_upload, a.keyword" .
            " FROM {$CONFIG['TABLE_ALBUMS']} AS a " .
            " LEFT JOIN {$CONFIG['TABLE_PICTURES']} AS p ON a.aid = p.aid AND p.approved =  'YES' ".
            "WHERE a.aid IN $album_set" . "GROUP BY a.aid";
    $alb_stats_q = cpg_db_query($sql);
    $alb_stats = cpg_db_fetch_rowset($alb_stats_q);
    mysql_free_result($alb_stats_q);


in index.php, but now i notice that all my thumbnails for my albums are gone, and if i try modify the album and putting a static thumbnail insted of "last upload" they still wont show! Is there a way to modify the code above to remove the statistics (which apparently is lagging the page) but keep the code that is required for the album thumbnails to work (static or last upload dosnt matter, just that one of them work would be awesome)

thanks in advance guys
« Last Edit: July 18, 2006, 12:03:16 am by GauGau »
Logged

Nibbler

  • Guest

Stop making multiple threads just to get attention. Locking.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 18 queries.