Hi,
Does anyony can tell me why there is this request in global.php :
$new_cutoff = time() - (60 * 60 * 24 * $config['new_cutoff']);
$sql = "SELECT c.cat_id, c.cat_name, c.cat_description, c.cat_parent_id, c.cat_hits, c.cat_order, c.auth_viewcat, c.auth_viewimage, c.auth_download , c.auth_upload, c.auth_directupload, c.auth_vote, c.
auth_sendpostcard, c.auth_readcomment, c.auth_postcomment, COUNT(i.image_id) AS new_images
FROM ".CATEGORIES_TABLE." c
LEFT JOIN ".IMAGES_TABLE." i ON ( i.cat_id = c.cat_id AND i.image_date >= $new_cutoff AND i.image_active = 1)
GROUP BY c.cat_id
ORDER BY c.cat_order, c.cat_name ASC";
$result = $site_db->query($sql);
This request is VERY slow (2seconds) and run on every webpage.
I replaced this request by : select * from global
As Global a new table and I write in global table every hour,
A now all my webpage are generated in less the 1sec
Cyrille