# phpDox - Query\QueryBuilder::set

# Query\QueryBuilder::set

#### Sets values for inserts / updates / deletes

## Signature

`public function set(mixed $key, [mixed $val = NULL] )`

## Parameters

`$key` — mixed
`$val` — mixed

## Returns

QueryBuilder

## Defined by Interface

`QueryBuilderInterface`

## Violations

### PHPMessDetector

Line | Rule | Message
--- | --- | ---
387 - 389 | ElseExpression | The method set uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.