- $Model->where("id=%d and username='%s' and
- xx='%f'",array($id,$username,$xx))->select();
或者
- $Model->where("id=%d and username='%s' and
- xx='%f'",$id,$username,$xx)->select();
模型的query和execute方法 同样支持预处理机制,例如:
- $model->query('select * from user where id=%d and status=%d',$id,$status);
或者
- $model->query('select * from user where id=%d and
- status=%d',array($id,$status));
execute方法用法同query方法。