1:  

$data ['parentid'] = $pid;

M('menu')->where($data)->order(' id asc  ')-> select();   //  select 是选择多条数据

M('menu')->where($data)-> find();   //  find 是选择一条数据,系统会自动加上 limit(1)

 

 

// table更換数据表名称
$data1= $article->table('(SELECT * FROM `table` GROUP BY `ID`) T')->count();
$sql=$article->_sql();


//join连接
$article->alias('a')->join('menu b on a.tid=b.id')->select();
$sql= $article->_sql();

 

相关文章:

  • 2021-10-28
  • 2021-08-28
  • 2021-10-08
  • 2021-12-27
  • 2021-08-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-12
  • 2021-05-24
  • 2021-09-23
  • 2021-10-06
  • 2021-09-25
  • 2022-12-23
相关资源
相似解决方案