I am using the following sql statement:
$sql = "INSERT INTO counter (uid, placeid, lastdate) VALUES
('" . $uid . "', '" . $place->place->id . "', '" . $added . "')
ON duplicate KEY UPDATE count = count + 1`";
This keep tracks of how many times people check in. I do not want multiple check ins a day, so when if someone checks in twice a day we do not record it.
If $added = lastdate, I do not want to update the count.
Can this be done with a sql statement?