脚本宝典收集整理的这篇文章主要介绍了PHP受影响的行= 1将无法正常工作,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
<?PHP ob_start(); header("Cache-Control: no-cache,must-revalidate"); // HTTP/1.1 header("Expires: Sat,26 Jul 1997 05:00:00 GMT"); // Date in the past header('Content-tyPE: text/htML; charset=utf-8'); include "tilslut.PHP"; $userid = $_GET["userid"]; $s = MysqL_query("SELECT points,lastpoint From member_PRofile WHERE user_id = '".$userid."'"); $n = MysqL_fetch_array($s); $tid = time(); MysqL_query("UPDATE member_profile set points = points+1,lastpoint=$tid WHERE lastpoint<=$tid-60 AND user_id = '".$userid."'"); $e = MysqL_query("SELECT points From member_profile WHERE user_id = '".$userid."'"); $f = MysqL_fetch_array($e); if (MysqL_affected_rows() == 1) { $s = MysqL_query("SELECT points FROM member_profile WHERE user_id = '".$userid."'"); $n = MysqL_fetch_array($s); ?> Inserted! <? }else{ echo "Already got"; } ob_flush(); ?>@H_404_12@我有这个给点.
更新查询有效,并且仅在lastpoint< = time() - 60时给出点,但即使它没有插入,它仍然会说“已插入”.
我曾尝试使用受MysqL影响的行来检查它是否有影响,但这似乎不起作用.
以上是脚本宝典为你收集整理的PHP受影响的行= 1将无法正常工作全部内容,希望文章能够帮你解决PHP受影响的行= 1将无法正常工作所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。