Author Topic: How to show total postcards in the statistics  (Read 3293 times)

0 Members and 1 Guest are viewing this topic.

Offline jamstave

  • Newbie
  • *
  • Posts: 49
    • View Profile
How to show total postcards in the statistics
« on: October 09, 2005, 04:26:16 AM »
Hi..I want show total postcards(from gallery stated) in the site statistics?
Using "postcard_id"

gallery/postcards.php?postcard_id=4707

I tried this code in the "stats.php" but it's doesn't work please someone help me.

Code: [Select]
//-----------------------------------------------------
//--- Total Postcards ----------------------------------------
//-----------------------------------------------------
   $sql = "SELECT COUNT(*) as postcards
          FROM ".POSTCARDS_TABLE;
  $row = $site_db->query_firstrow($sql);

   
  $total_postcard = "".$lang['total_postcard']."<B> ".$row['postcards']."</B>\n";
 
  $site_template->register_vars("total_postcard", $total_postcard);
unset($total_postcard);

Jamestave.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: How to show total postcards in the statistics
« Reply #1 on: October 09, 2005, 06:36:47 AM »
what exactly doesnt work?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline jamstave

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: How to show total postcards in the statistics
« Reply #2 on: October 09, 2005, 10:12:50 PM »
what exactly doesnt work?


Hi...V@no thanks for your reply and it's show the current postcard in the database but i need total postcard since the gallery stated.

It's show this
Current postcard: 97

But i need to show this

Total Postcard: 4707

I need to get the last postcard id from the database.

gallery/postcards.php?postcard_id=4707

Jamestve.