欢迎光临
我们一直在努力

array_filter、find_in_set查询id是否在id集合中、concat连接字符串,ifnull、if用法

1:array_filter检查每个元素是不是数字 

if(array_filter($this->data[‘log_id’] ,’is_numeric’) !== $data[‘log_id’]) echo ‘000’;

2:concat连接字符串,ifnull、if用法
update log
set users = concat(ifnull(users,”),if(users,’,411′,’411′))
where log_id between 453729 and 453740;

3:find_in_set查询id是否在id集合中
SELECT
    *
FROM
    log
WHERE
    log_id BETWEEN 453729
AND 453740 and !find_in_set(‘2’,ifnull(l.users,””));

赞(0)
【声明】:本博客不参与任何交易,也非中介,仅记录个人感兴趣的主机测评结果和优惠活动,内容均不作直接、间接、法定、约定的保证。访问本博客请务必遵守有关互联网的相关法律、规定与规则。一旦您访问本博客,即表示您已经知晓并接受了此声明通告。