1. public 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如何进行批量查询TP如何进行批量查询TP如何进行批量查询

相关文章:

  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-17
  • 2021-08-26
猜你喜欢
  • 2021-05-27
  • 2022-12-23
  • 2022-12-23
  • 2021-12-21
  • 2023-04-06
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案