doutangtan6386 2013-05-14 11:14
浏览 36
已采纳

这个PHP投票脚本有什么问题? [关闭]

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.

  • 写回答

1条回答 默认 最新

  • dsgd5756 2013-05-14 11:46
    关注

    I've been using totally different tables and etc. It's fixed. Thank you a lot guys for your time and great support on stackoverflow. It's been always really appreciated.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部