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:

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

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