/    Sign up×
Community /Pin to ProfileBookmark

Changing Variables

This is what i got

[code=php] $sql = “SELECT count(*) as cnt, DAYNAME(recieved) as dnr,
TO_DAYS(recieved) as tdr
FROM $dbsql
WHERE recieved >= DATE_SUB( CURRENT_DATE, INTERVAL 6 day )
GROUP BY dnr,tdr
ORDER BY tdr”;
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result)) {
$l->AddValue(“$row[dnr]”, array($row[cnt]));
}
[/code]

My table structure is like so:
id browser ip recieved refer
1 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv… 87.113.14.220 2006-11-28 None
2 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv… 87.113.14.192 2006-11-23 None
3 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv… 87.112.26.158 2006-11-24 None
4 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv… 87.113.14.220 2006-11-25 None
5 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1;… 87.113.14.220 2006-11-26 None
6 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;… 87.113.14.220 2006-11-29 None
7 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv… 87.113.14.220 2006-11-27 None
8 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv… 87.113.14.220 2006-11-22 None
9 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv… 87.113.14.220 2006-11-29 [url]http://shogans.com/stats/[/url]
10 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv… 87.113.14.220 2006-11-29 None
11 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv… 87.113.14.220 2006-11-29 [url]http://www.shogans.com/index.php?do=newestmembers[/url]
12 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv… 87.113.14.220 2006-11-29 [url]http://www.shogans.com/index.php?do=gotown:1[/url]
13 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv… 87.113.14.220 2006-11-29 [url]http://www.shogans.com/index.php[/url]
14 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv… 87.113.14.220 2006-11-29 [url]http://www.shogans.com/index.php?do=fight[/url]
15 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv… 87.113.14.220 2006-11-29 [url]http://www.shogans.com/index.php?do=victory[/url]

I am trying to produce something that counts the unique hits for the past seven days and outputs it using this template:
$l->AddValue(“*The Day*“, array(*Unique hits for that day*));

eg:
$l->AddValue(“Friday”, array(126));

As then this is taken by a graph generator and drawn.

Any help would be appreciated

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@PezmcauthorNov 29.2006 — Please Ignore this and below post
Copy linkTweet thisAlerts:
@russellNov 29.2006 — [code=php]
for($i=0; $i<9; $i++) {
echo $i . "<br>";
}[/code]
Copy linkTweet thisAlerts:
@PezmcauthorNov 29.2006 — Ignore
Copy linkTweet thisAlerts:
@russellNov 29.2006 — still not 100% sure i understand what u r looking for, but sounds like you need to store the ranks in an array...
Copy linkTweet thisAlerts:
@PezmcauthorNov 29.2006 — I am trying to get unique hits per date
×

Success!

Help @Pezmc spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...