where() 공개 메소드

指定AND查询条件
public where ( mixed $field, mixed $op = null, mixed $condition = null )
$field mixed 查询字段
$op mixed 查询表达式
$condition mixed 查询条件
예제 #1
0
 /**
  * 查询默认不包含软删除数据
  * @access protected
  * @param \think\db\Query $query 查询对象
  * @return void
  */
 protected function base($query)
 {
     $field = $this->getDeleteTimeField(true);
     $query->where($field, 'null');
 }
예제 #2
0
파일: SoftDelete.php 프로젝트: HXFY/think
 /**
  * 查询默认不包含软删除数据
  * @access protected
  * @param \think\db\Query $query 查询对象
  * @return void
  */
 protected static function base($query)
 {
     if (static::$deleteTime) {
         $query->where(static::$deleteTime, 'null');
     }
 }