码迷,mamicode.com
首页 >  
搜索关键字:thinkphp-union    ( 2个结果
ThinkPHP/---union
$sql = " (select id,'1'as type ,content,photo,issuetime as t from experience where userid = {$userid}) UNION ALL (select id,'2'as type, name as conten ...
分类:Web程序   时间:2019-01-02 15:09:45    阅读次数:234
thinkphp-union
说明用于合并两个或多个SELECT语句的结果集示例Db::field(‘name‘) ->table(‘think_user_0‘) ->union(‘SELECTnameFROMthink_user_1‘) ->union(‘SELECTnameFROMthink_user_2‘) ->select();Db::field(‘name‘) ->table(‘think_user_0‘) ->union(function($query)..
分类:Web程序   时间:2017-02-10 00:08:15    阅读次数:210
2条  
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!