声明:其他简单方法见ThinkPHP文档
返回三个字段
$select = Db::table('user')->field('uid,phone,u_name')->select();
排除字段
$select = Db::table('user')->withoutField('uid,phone,u_name')->select();
返回字段改名
$select = Db::table('user')->field('uid,phone,u_name as n')->select();
多表查询
Db::table('表一 别名,表二 别名')->where()->select();
多表查询尽量是两个表字段进行匹配
Db::table('表一 别名,表二 别名')->where(别名.字段名=别名.字段名或1)->select();