forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: net on March 19, 2008, 11:27:02 pm

Title: [Solved]: Question regarding query in index.php
Post by: net on March 19, 2008, 11:27:02 pm
Hi,

I have a question regarding this part in the index.php

Code: [Select]
        $result = cpg_db_query("SELECT count(*) FROM {$CONFIG['TABLE_PICTURES']} WHERE 1 $current_album_set AND approved='YES'");
        $nbEnr = mysql_fetch_array($result);
        $picture_count = $nbEnr[0];
        mysql_free_result($result);

What exactly does this do?

Thanks!
Title: Re: Question regarding query in index.php
Post by: Nibbler on March 19, 2008, 11:32:12 pm
Counts the number of files in the database.
Title: Re: Question regarding query in index.php
Post by: net on March 19, 2008, 11:33:52 pm
Thanks.