0
点赞
收藏
分享

微信扫一扫

TP如何进行批量查询

写心之所想 2022-05-07 阅读 59
1. public function getUserInfo($uid){
ublic function getUserInfo($uid){

2. if(is_null($uid) || empty($uid)){return false;}

3. if(is_array($uid)){

4. $where['user_id'] = array('in',$uid);

5. }else{

6. $where['user_id'] = array('eq',$_SESSION['uid']);

7. }

8. return M('User')->where($where)->select();

9. }

最近在优化代码,特别实用。

TP如何进行批量查询_htmlTP如何进行批量查询_javascript_02TP如何进行批量查询_html_03


你要保守你心,胜过保守一切。

作者:刘俊涛的博客​​




举报

相关推荐

0 条评论