thinkphp 联合查询
来源:互联网 发布:淘宝自动核对地址软件 编辑:程序博客网 时间:2024/05/18 18:44
联合查询
1、原生查询
$sql =$sql='select p.product_name,z.message as zmessage,z.rdtime,r.message,r.rdtime from wsd_product as p,wsd_product_zixun as z,wsd_product_zixun_reply as r where p.id=z.lipin_id and z.id=r.zixun_id order by z.rdtime';
$list = $Form->query($sql);
2、join() 两表查询
$list = $Form->join('think_sort ON think_form.sort_id = think_sort.sort_id' )->select();
3、join() 多表查询
$list = $Form->join('think_sort ON think_form.sort_id = think_sort.sort_id' )->join('think_brand ON think_form.brand_id = think_brand.brand_id' )->select();
4、table()
$list = $user->table('user_status stats, user_profile profile')->where('stats.id = profile.typeid')->field('stats.id as id, stats.display as display, profile.title as title,profile.content as content')->order('stats.id desc' )->select();
- thinkphp 联合查询
- 联合查询 thinkPHP
- thinkPHP多表联合查询
- thinkPHP多表联合查询
- ThinkPHP多表联合查询实例代码
- thinkphp 数据库设置前缀问题 联合查询
- ThinkPHP多表联合查询的常用方法
- ThinkPHP多表联合查询的常用方法
- ThinkPHP多表联合查询的常用方法
- ThinkPHP多表联合查询的常用方法
- THINKPHP 提供数据表联合查询的简单方法
- 联合查询
- 联合查询
- 联合查询
- 联合查询
- 联合查询
- 联合查询
- 联合查询
- Spring的BeanFactoryPostProcessor和BeanPostProcessor
- 垃圾收集算法
- 推荐系统-利用用户行为数据
- ubuntu 安装php5.6.21
- Lucene的分析过程
- thinkphp 联合查询
- ro.serialno
- sql语句-linq语言-lambda表达式对照(不错先记下了。。。)
- 全文检索原理
- Callable 和Future
- 数据结构与算法练习-Number/数字
- 从QR分解到PCA,再到人脸识别(c++实现)
- SQL中union 与union all的用法
- java动态代理(JDK和cglib)