General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old March 22nd, 2003, 12:54 PM
praveen praveen is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: india
Posts: 7 praveen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 13 sec
Reputation Power: 0
Scripting Help

Hi friends,

I am now on a Banner Display Program project (Php, Mysql), which displays banners on different web sites.

Now the problem is with the Statistics part .I need that in such a fashion such that if we select this month say (March 2003) it should display the banner statistics such as total impressions and total clicks for each banner starting from month (1 march 2003) to (31 march 2003) displayed one by one.

I had created a banner table with impressions and clicks which will be updated on each impression or click

In addition to that I have one more table details with the following values recorded in it

Bid (banner id) - Click (timestamp (14)) - Ip (client ip from which banner was clicked) – cid (id of each website displaying the banner) and type (0,1 (0 means impression, 1 means click)) i am adding a screen shot of this table below.

Such that each impression or click will add a new record to the details table

I tried to fetch the data like this

$thismonthdays=Date("t" ); // this month
$thisyear="2003";
$thismonth="03";
for($i=1;$i<=$thismonthdays;$i++){
$mqry="SELECT count( * ) FROM `details` WHERE click > UNIX_TIMESTAMP('$thisyear-$thismonth-$i') AND TYPE = 0"; // for impressions
$qry=mysql_query($mqry)or die(mysql_error());
if($qry){
//echo($mqry."<br>" );
echo("$i-".mysql_result($qry,0)."<br>"
}
}

but it is returning 0 for all dates..

Is there any easy way to fetch the statistics as i mentioned above.

This method will insert much records in the details table ( if a site have 1000 views /day it will insert 1000 records and if 4-5 sites are used then 5x1000=5000 records per day).

Am I going the right way? Can any body give me another good solution?

Please help
Thanks in advance

Regards
Praveen

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Scripting Help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway