thinkphp子查询
来源:互联网 发布:mac系统升级10.12.6 编辑:程序博客网 时间:2024/06/07 06:54
直接上代码
$product_info = M('product_info as info');
$productinfo = $product_info->join('left join c_price_comment as comment on info.sku=comment.sku')->where($where)->order('info.create_time desc')->field('info.*,comment.comment_count')->buildSql(); $list = M()->table($productinfo.' a')->order(' '.$order.'')->group('sku ')->limit($limit)->select();
buildSql方法后不会进行实际的查询操作,而只是生成该次查询的SQL语句
0 0
- thinkphp子查询
- Thinkphp 模型->子查询
- Thinkphp子查询问题总结
- THINKPHP查询
- ThinkPHP的查询语言
- ThinkPHP SQL查询
- ThinkPHP中的查询方法
- Thinkphp 多表查询
- thinkphp 多表查询
- thinkphp查询集合
- ThinkPHP的数据库查询
- thinkphp关联查询
- thinkphp 查询语句
- ThinkPHP 查询语言
- thinkphp多表查询
- ThinkPHP 统计查询
- ThinkPHP 原生SQL查询
- thinkphp之数据库查询
- BZOJ 3782 上学路线 动态规划+Lucas定理
- GDB断点失效(2)
- js中scrollLeft,scrollWidth,clientWidth,offsetWidth完全详解
- C++回调函数的简单描述
- Xshell显示中文乱码问题
- thinkphp子查询
- 6.1 Session
- 完美解决wampserver 在windows Server 2003系统中启动不了的问题
- linux内核加载顺序(system.mp)
- VC中使用GDI+实现为按钮加载Png图片
- 无法定位程序输入点glPopAttrib于动态连结库OPENGL.dll上
- 先转一下===
- iOS应用架构谈 view层的组织和调用方案(转自Casa Taloyum)
- Linux 定位和查找 which locate whereis