thinkphp中批量查找数据&thinkphp中批量往数据库中插入数据
2022-07-28 14:14:58
231
{{single.collect_count}}

一、thinkphp中批量查找数据

$ids = [1,2,3,4];$map['id']= array('IN',$ids);$sellers = M()->table('md_business')->where($map)->select();dump($sellers);

二、thinkphp中批量往数据库中插入数据

$dataList =[array('id'=>1,'name'=>'ljl'),array('id'=>2,'name'=>gss)];$addRes = M()->table('md_ticket')->addAll($dataList);
回帖
全部回帖({{commentCount}})
{{item.user.nickname}} {{item.user.group_title}} {{item.friend_time}}
{{item.content}}
{{item.comment_content_show ? '取消' : '回复'}} 删除
回帖
{{reply.user.nickname}} {{reply.user.group_title}} {{reply.friend_time}}
{{reply.content}}
{{reply.comment_content_show ? '取消' : '回复'}} 删除
回帖
收起
没有更多啦~
{{commentLoading ? '加载中...' : '查看更多评论'}}