This is my vote script for my game: http://pastebin.com/p8DF7SVK
Just the lines where the check function is:
$num_rows = $adb->doQuery('SELECT ' . ACCOUNT . ' FROM ' . ACCOUNT_TABLE . ' WHERE DateDiff(dd, CreateDate, GetDate()) <= 1 AND ' . ACCOUNT . ' = ?', $_SESSION[ACCOUNT]);
if ($num_rows != 0)
{
DEBUG_LOG(__METHOD__, 'Account only just registered! Account = %s, ip = %s', $_SESSION[ACCOUNT], $this->site->getRemoteIP());
header('Location: ' . $url);
return;
}
but somehow everytime someone wants to vote. It always says in the logs: Account only just registered!
and it doesn't add the points for voting .. so, something wrong should be with this check but I am not able to understand what exactly. I've tried to set the account to be 1 month old, 1 year old and etc but still everything the same. They vote, the check shows in the log that it's just new account (no matter if the account is 1 year old even) and it doesn't add the points.
Check line 123-129, where the check function is. Will be much appreciated if you let me know what's wrong with this check for new accounts.