<?php namespace appindexcontroller; use appindexmodelDaohang; class Demo6 { public function get() { //dump(Daohang::get(3)); $res = Daohang::field('id,title')->where('id',9)->find();//返回对象 dump($res); } public function all() { //dump(Daohang::all()); $res = Daohang::field('id,title')->where('id','in','1,2,3')->select(); dump($res); } }
php知识网