forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: dke on July 17, 2006, 03:17:07 pm

Title: When disabeling query that fetch album stats i loose all the "album thumbnails"
Post by: dke on July 17, 2006, 03:17:07 pm
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
Title: Re: When disabeling query that fetch album stats i loose all the "album thumbnails"
Post by: Nibbler on July 17, 2006, 03:23:01 pm
Stop making multiple threads just to get attention. Locking.