Author Topic: Stast: Counting the FLV, WMV, JPG files  (Read 3111 times)

0 Members and 1 Guest are viewing this topic.

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Stast: Counting the FLV, WMV, JPG files
« on: July 19, 2009, 12:46:14 AM »
Hello,

I want to count the quantity of the FLV, WMV, JPG.. file on my galery. For example:

FLV files: 100
WMV files: 200
JPG files: 300
PNG files: 400


Can someone help please?

Any support will be very appreciated.

Cruxy

Rembrandt

  • Guest
Re: Stast: Counting the FLV, WMV, JPG files
« Reply #1 on: July 20, 2009, 03:52:52 PM »
Hi!
...I want to count the quantity of the FLV, WMV, JPG.. file on my galery. For example:
...

find in Index.php
Quote
//--- Print Out ---------------------------------------

insert before:

$sql 
"SELECT count(image_media_file)count_jpg 
           FROM "
.IMAGES_TABLE.
           WHERE image_active = 1 AND cat_id NOT IN ("
.get_auth_cat_sql("auth_viewcat""NOTIN").") AND image_media_file LIKE '%.jpg' ";
                
$result $site_db->query($sql);
 
	
$row mysql_fetch_object($result);
	
$count_jpg $row->count_jpg;
	

$site_template->register_vars("count_jpg"$count_jpg);


in your home.html, wherever you want: {count_jpg}

mfg Andi

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Re: Stast: Counting the FLV, WMV, JPG files
« Reply #2 on: July 21, 2009, 12:35:41 AM »
Thanks mate. It works perfect :D