SQL语句如下:
set @vl=(SELECT Stress FROM `account`.`Servers` WHERE ServerId = 1);
set @vl=@vl+1;
update `account`.`Servers` Set Stress = @vl where ServerId = 1;错误提示如下:
strError = 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
'\set @vl=@vl+1;\update `account`.`Servers` Set Stress = @vl where ServerId = 1' at line 1说明:
我在mysql的客户端软件运行上面的代码是没有问题的,但是放到程序里面用mysql_query去执行的时候报那个错误,高手请指点。
set @vl=(SELECT Stress FROM `account`.`Servers` WHERE ServerId = 1);
set @vl=@vl+1;
update `account`.`Servers` Set Stress = @vl where ServerId = 1;错误提示如下:
strError = 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
'\set @vl=@vl+1;\update `account`.`Servers` Set Stress = @vl where ServerId = 1' at line 1说明:
我在mysql的客户端软件运行上面的代码是没有问题的,但是放到程序里面用mysql_query去执行的时候报那个错误,高手请指点。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货