Advanced search  


cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.

Pages: [1]   Go Down

Author Topic: pic_count is unused ?  (Read 5617 times)

0 Members and 1 Guest are viewing this topic.


  • Coppermine newbie
  • Offline Offline
  • Posts: 2
pic_count is unused ?
« on: May 31, 2005, 06:47:08 pm »

Maybe it is my bad english that i cant find something about the field pic-count in table cpg_albums; it seems this field is not used? So why it is here?
I will take a look inside the code now; maybe find something to improve. ;-)
« Last Edit: May 31, 2005, 07:20:39 pm by Nibbler »


  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 244
  • Exploring Coppermine in every directions
    • tieum's pics


  • Coppermine newbie
  • Offline Offline
  • Posts: 2
pic_count in cpg_albums
« Reply #2 on: May 31, 2005, 07:09:19 pm »

For my installation it seems there is a field pic_count in table cpg_albums that is not used; beacuse i integrate vb and some other cms, i need the number of pics in a field, so i have not to count it every time i need this number. For this i write this little cron-job for vb to count the pics one time a week.
Save it to a file in include/cron; go to vb admin; add a new cron_job with the filename.

Code: [Select]
// Count pics from cpg_pictures for pic_count in cpg_albums

error_reporting(E_ALL & ~E_NOTICE);

if (!

$aus=$DB_site->query("SELECT aid from cpg_albums ORDER BY aid DESC");
        while ( 
$au=$DB_site->fetch_array($aus) ) {
"work on album"$au[aid]. " ... ";
$galcnt $DB_site->query_first("SELECT COUNT(*) AS du
                                                FROM cpg_pictures
                                                WHERE aid = '
$anzahl $galcnt['du'];
"Anzahl: " $anzahl "<br />";
$DB_site->query("UPDATE cpg_albums set pic_count = '$anzahl' where aid = '$au[aid]'");


  • Guest
Re: pic_count is unused ?
« Reply #3 on: May 31, 2005, 07:21:06 pm »

Yes, pic_count and a few others are unused and are not in new installations as of 1.4.1

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
Re: pic_count is unused ?
« Reply #4 on: June 01, 2005, 09:00:45 am »

merged the two threads made by robert9 that deal with the same thing into this one (see above postings). Please don't double-post in the future.
Pages: [1]   Go Up

Page created in 0.018 seconds with 20 queries.