thinkphp模型没继承model报的错

时间:2021-07-11 15:29:19

Call to undefined method RoleModel::query()

错误位置

FILE: H:\www\tpsmarty\shop\Lib\Model\RoleModel.class.php  LINE: 17

错误的代码

class RoleModel extends Model{
//put your code here
function giveAuth($auth_ids){
$sql="select auth_c,auth_a from sw_auth where auth_id in ($auth_ids)";
$info=$this->query($sql);
show($info);
}
}