php 如何修改多个值

WBOY
Release: 2016-06-23 13:30:13
Original
1246 people have browsed it

新手求助

一张表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具体什么意思,然后配合上边试试

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!