对象操作 查询 //1.简单查询 $admin=Admin::model()->findAll($condition,$params); $admin=Admin::model()->findAll("username=:name",array(":name"=>$username)); $infoArr= NewsList::model()->findAll("status = '1' ORDER BY id DESC limit…
查询 //1.简单查询 $admin=Admin::model()->findAll($condition,$params); $admin=Admin::model()->findAll("username=:name",array(":name"=>$username)); $infoArr= NewsList::model()->findAll("status = '1' ORDER BY id DESC limit 10 &…
-------------------------------ActiveRecord---------------------------------------- 查询: // find the customers whose primary key value is 10 $customers = Customer::findAll(); $customer = Customer::findOne(); // the above code is equivalent to: $custom…