DB_dsql::fieldQuery PHP Méthode

fieldQuery() public méthode

Removes all field definitions and returns only field you specify as parameter to this method. Original query is not affected ($this) Same as for field() syntax.
public fieldQuery ( string | array $field, string $table = null, string $alias = null ) : DB_dsql
$field string | array Specifies field to select
$table string Specify if not using primary table
$alias string Specify alias for this field
Résultat DB_dsql Clone of $this with only one field
    public function fieldQuery($field, $table = null, $alias = null)
    {
        $q = clone $this;
        return $q->del('fields')->field($field, $table, $alias);
    }