PHP mysql_query() 执行存储过程报错喽
第一种方式:
$data = mysql_query("CALL DB.Query('11',‘S’)");
if(!$data){
dump(mysql_error());
}
这种方式查询正常,没问题!
第二种方式:
$data = mysql_query("SET @A = '11',@B='S'; CALL DB.Query(@A,@B);");
if(!$data){
dump(mysql_error());
}
这样就报错了
"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CALL bi.gm_queryRoleLoginLogOutLog(@A,@B); ' at line 1"
就想知道啥原因,麻烦啦