Hello,
I want to check whether an IP is unique or not.
Unique is a time defined in seconds.
The IPs are stored in a mysql database and there is also a column that has the last-visiting time (DATETIME field).
Now I want to check the "uniqueness" of an IP within the mysql-statement.
e.g.:
$uniqueip = 3600;
$ip = "something";
mysql_query("SELECT *... WHERE IP='$ip' AND (TIME_TO_SEC(NOW())-$uniqueip)>TIME_TO_SEC(LastVisit)");
This should return a result when the IP is unique.
But this does not work.
Any suggestions?
Thanks