Think\Db\Query::where PHP Method

where() public method

指定AND查询条件
public where ( mixed $field, mixed $op = null, mixed $condition = null )
$field mixed 查询字段
$op mixed 查询表达式
$condition mixed 查询条件
    public function where($field, $op = null, $condition = null)
    {
        $param = func_get_args();
        array_shift($param);
        $this->parseWhereExp('AND', $field, $op, $condition, $param);
        return $this;
    }

Usage Example

Beispiel #1
0
 /**
  * 查询默认不包含软删除数据
  * @access protected
  * @param \think\db\Query $query 查询对象
  * @return void
  */
 protected function base($query)
 {
     $field = $this->getDeleteTimeField(true);
     $query->where($field, 'null');
 }
All Usage Examples Of Think\Db\Query::where