Author |
Message |
|
You have no idea how much time I wasted on this. Would probably still be working on it if not for you.
THANK YOU
I have changed the version on all the scripts to version 1.2!!!!
Thank you again
|
|
|
It does appear that the version on the website is NOT version 1.1 but maybe 1.2?
Can't now, but will try it shortly and let you know
|
|
|
hmmm, website says version 1.1 so I didn't bother to download as my version is 1.1
I think I am going to shoot myself if it is a new version
Will let you know -
|
|
|
The way this class is called you cannot echo anything fromit (already tried it).
This is what it is doing...
$this->db->query("UPDATE ".$this->table['daily']." SET visitors=visitors+1 WHERE day = now()");
if ($this->db->affected_rows() == 0) {
// $this->db->query("INSERT INTO ".$this->table['daily']." SET visitors='1', day = now()");
It is running the " if ($this->db->affected_rows() == 0)" and continuously adds a new date and entry of 1. One one site with 10,000 daily visits, I don't even want to mention the database size!
If I comment it out, it stops adding new entries (tried an echo here but not displayed).
The question is, why is it always seeing the "affected rows()==0" ????
You would think that function affected rows was the problem in mysql.class.php but the total update works, i.e.,
$this->db->query("UPDATE ".$this->table['total']." set total=total+1");
if ($this->db->affected_rows() == 0) {
$this->db->query("INSERT INTO ".$this->table['total']." SET total='1', installtime = UNIX_TIMESTAMP()");
In thsi case (total), it is executing the set "total=total+1" and NOT the affected_rows() == 0)
Dont mind saying I am stumped
|
|
|
No, it does not make sense.
The function to update counter is in counter.class.php on line 70.
$this->db->query("UPDATE ".$this->table['total']." set total=total+1"); seems to work
$this->db->query("UPDATE ".$this->table['daily']." SET visitors=visitors+'1' WHERE day = now()"); - does not
echo $visits['total']; works
echo $visits['visits_today']; does not
Cannot figure out why ?????
|
|
|
Have been using your counter for years on many different websites. Just moved them to a new server and apparently mysql.class.php is not compatible with 5.3.
I see you have it your Daily Counter working on your site. Are you using text files or do you have a fix for mysql.class.php.
The total visitors seems to work fine, but daily ....
It logs each visitor as "1" in the database and is not adding them
and then fails to return a value for $visits['visits_today']
thanx
Actually looking at the code, the problem is in counter.class.php
|
|
|