MYSQL查询
if (substr($remessage,0,2)== 'TP '){
$PSN=str_replace( 'TP ', ' ',$remessage);
echo $PSN;
exit;
sql= "select id from tempnum where id= ' ".intval($PSN). " ' ";
$rs=$conn-> execute($sql);
if ($rs-> EOF)
{
SMSSendReturnStr($config[ 'sp '],$rs-> fields[ "MobileNum "], '对不起,请没有找到您要投票的人,请核对。谢谢您的参与 ');
}
else{
$conn-> execute( "update tempnum set PS=PS+1 where id= ' ".$PSN. " ' ")
}
break;
exit;
}
--------------------------------------
$remessage是用户通过手机发来的短信 ,格式为TP000001 TP后面是数字对应的ID,但是不知道为什么总是查询那出错,先短信格式正确
Parse error: syntax error, unexpected '= ' in D:\web\XXX\XXX.php on line 90
XIEXIE
------解决方案--------------------
sql= "select id from tempnum where id= ' ".intval($PSN). " ' ";
===================
$sql = ".... ";
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号