当前位置:Gxlcms > PHP教程 > php如何修改多个值

php如何修改多个值

时间:2021-07-01 10:21:17 帮助过:4人阅读

新手求助

一张表table

id uid age time status



现在需要筛选出status=1或2的数据批量修改age=10以及status=3,并且给每个人发送通知

单个发送函数已经写了:notice($uid,$age,$status);

大概知道是数组来实现,不知道怎么写规范,大家帮帮忙


回复讨论(解决方案)

1、select *from tablename where status=1 or status = 2
2、发数据
3、update tablename set age=10,status=3 where status=1 or status = 2

看一下 notice($uid,$age,$status);这个$status具体什么意思,然后配合上边试试

人气教程排行