"/> ">

if语句异常

WBOY
Release: 2016-06-13 13:34:57
Original
965 people have browsed it

if语句错误
这里是截取部分的,所以大小括号可能没注意,但是现在是一直的跳到else去,不能执行前面的

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->$sql = "Select * from #@__tgreg where userid='$id'"; //读取tgreg数据表,条件userid=网址id?=***
$NIC_arcRow = $dsql->GetOne($sql);  //成立的条件,一条数据
$tgtime =$NIC_arcRow['tgtime'];   //输出tgreg数据表中的username值
$nowjifena=$NIC_arcRow['jifena'];
$time= time();
if($dsql->ExecuteNoneQuery($query) && $tiem - $tgtime > 24*3600 && $nowjifena ExecuteNoneQuery("update `#@__member` set `scores`= scores + $jifena  where mid='".$userid."' ");//SQL执行写入用户加积分
//上面这句例子直接更新用户资料 加100积分,更新用户表 member

//die($dsql);

$dsql->ExecuteNoneQuery("update `#@__tgreg` set `jifena`=jifena + $jifena ,`cishu`=cishu+1 , `tgtime`=$time where userid='".$userid."' and username='".$username."' ");//SQL执行写入用户加积分
//     上面这句更新推广人的积分制度jifena类。注意区分A类和B类 用户表tgreg

//$dsql->ExecuteNoneQuery("update `#@__tgreg` set `jifenb`= jifenb + $jifenb where userid='".$userid."' and username='".$username."' ");//SQL执行写入用户加积分
//预留 上面这句更新推广人的积分制度jifenb类。注意区分A类和B类 用户表tgreg

        header('location:index.html');//写入后也要跳转了
    }//检测有写入就 括号2
else{  echo wrong;
}
Copy after login


------解决方案--------------------
既然是要满足 $dsql->ExecuteNoneQuery($query) && $tiem - $tgtime > 24*3600 && $nowjifena 那就对
$dsql->ExecuteNoneQuery($query)
$tiem - $tgtime > 24*3600
$nowjifena 分别检查一下
------解决方案--------------------
dsql->ExecuteNoneQuery($query) && $tiem - $tgtime > 24*3600 && $nowjifena 楼主检查下自己这个条件是不是都满足了。可以输出看看。
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template