update category
set sort=1 where id=1,
set sort=2 where id=5,
set sort=3 where id=12
·····
这么写会报错,请问类似这样的需求,有没有什么简单的写法?
还是只能
update ··· where id=1
update ··· where id=2
·····
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
case就可以实现拉