小编RON*_* 78的帖子

PHP MYSQL批量更新

有人能告诉我为什么我不能执行这个简单的脚本.我得到的错误是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 '1update page SET RegionId = 1 WHERE (RegionId = -1 or RegionId = -3) and Descri' at line 1 如果我将此语句复制到MySQLPHPAdmin它运行正常.请帮忙?提前致谢.

$sql = "update page SET RegionId = 2  WHERE (RegionId = -1 or RegionId = -3) and Description like '%Saskatoon%' LIMIT 1";
$sql = $sql . "update page SET RegionId = 1  WHERE (RegionId …
Run Code Online (Sandbox Code Playgroud)

php mysql

1
推荐指数
1
解决办法
1772
查看次数

标签 统计

mysql ×1

php ×1