Tested the class and works very well. One error which I can't find the solution for. Thought I might ask you, maybe you will know the answer:
With the example page included in the package I receive the error:
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in
/absolute path etc/httpdocs/inc/classes/count_visitors_class.php on line 115
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in
/absolute path etc/httpdocs/inc/classes/count_visitors_class.php on line 118
It has something to do with the method
because if I leave that one out of the example I don't receive the error.
All the other methods work perfectly.
Olaf Lederer - 2005-11-23 07:43:40 - In reply to message 1 from matthijs
I see the problem:
$sql = sprintf("SELECT ip2nationCountries.country AS variable, COUNT(*) AS value FROM %s AS tbl LEFT JOIN ip2nationCountries ON ip2nationCountries.code = tbl.country WHERE tbl.country <> '' GROUP BY tbl.country ORDER BY 2 DESC LIMIT 0,%s", $this->table_name, $limit);
The table names (uppercase C) are different (script en sql data);