When disabeling query that fetch album stats i loose all the "album thumbnails" When disabeling query that fetch album stats i loose all the "album thumbnails"
 

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

When disabeling query that fetch album stats i loose all the "album thumbnails"

Started by dke, July 17, 2006, 03:17:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dke

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

Nibbler