(1.4.1) Virtual album - image count 0 when displayable images - Page 2 (1.4.1) Virtual album - image count 0 when displayable images - Page 2
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

(1.4.1) Virtual album - image count 0 when displayable images

Started by P4ul, September 02, 2005, 11:24:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nibbler

    $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 p.aid";


Change that GROUP BY to a.aid instead of p.aid in both places that use the code.


P4ul

You're the manĀ  :)

Fixed it for me, i can move my virtual album anywhere in the tree and the linked count is correct , many thanks

that was index.php for anyone who needs the fix

Tranz