$db = D('database');
$joinStr=" as a LEFT JOIN yanzhi_database_data as b on a.id=b.id ";
$res=$db->field("description")->join($joinStr)->where(" a.id=4 ")->find();
$db->getlastsql();
SELECT description FROM `yanzhi_database` as a LEFT JOIN yanzhi_database_data as b on a.id=b.id where a.id=4
上一篇>>MySQL 显示表字段及注释等信息
下一篇>>常用的MySQL命令
Copyright © 2016 Allister All Rights Reserved