Doctrine\DBAL\Query\QueryBuilder::setValue PHP Метод

setValue() публичный Метод

$qb = $conn->createQueryBuilder() ->insert('users') ->values( array( 'name' => '?' ) ) ->setValue('password', '?');
public setValue ( string $column, string $value )
$column string The column into which the value should be inserted.
$value string The value that should be inserted into the column.
    public function setValue($column, $value)
    {
        $this->sqlParts['values'][$column] = $value;
        return $this;
    }

Usage Example

Пример #1
0
 private function setAddValues(array $serialized, QueryBuilder $qb)
 {
     $i = 0;
     foreach ($serialized as $column => $value) {
         $qb->setValue($column, '?');
         $qb->setParameter($i, $value);
         ++$i;
     }
 }
All Usage Examples Of Doctrine\DBAL\Query\QueryBuilder::setValue