MYSQL查询解决方法
时间:2021-07-01 10:21:17
帮助过:47人阅读
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 = ".... ";