gpt4 book ai didi

php - mysql更新倍数为什么不起作用?哦还有 php

转载 作者:行者123 更新时间:2023-11-29 04:08:19 26 4
gpt4 key购买 nike

我不明白为什么这行不通,每一行都行,但当我将它们连接在一起时却行不通......

mysql_query("
UPDATE imageProperties
SET value='98' WHERE element='img1' AND property='left';
SET value='67' WHERE element='img1' AND property='top';
SET value='15' WHERE element='img1' AND property='width';
SET value='15' WHERE element='img1' AND property='height';
SET value='22' WHERE element='img2' AND property='left';
SET value='49' WHERE element='img2' AND property='top';
SET value='62' WHERE element='img2' AND property='width';
SET value='75' WHERE element='img2' AND property='height';
");

我从这个问题的答案中得到了想法 here

最佳答案

语法错误。您应该为每个集合更新 imageProperties:

UPDATE imageProperties
SET value='98' WHERE element='img1' AND property='left';
UPDATE imageProperties
SET value='67' WHERE element='img1' AND property='top';
UPDATE imageProperties
SET value='15' WHERE element='img1' AND property='width';

关于php - mysql更新倍数为什么不起作用?哦还有 php,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21588999/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com