Prado\Data\Common\TDbCommandBuilder::createUpdateCommand PHP Method

createUpdateCommand() public method

Each array key in the $data array must correspond to the column name to be updated with the corresponding array value.
public createUpdateCommand ( $data, $where, $parameters = [] ) : TDbCommand
return TDbCommand update command.
    public function createUpdateCommand($data, $where, $parameters = array())
    {
        $table = $this->getTableInfo()->getTableFullName();
        if ($this->hasIntegerKey($parameters)) {
            $fields = implode(', ', $this->getColumnBindings($data, true));
        } else {
            $fields = implode(', ', $this->getColumnBindings($data));
        }
        if (!empty($where)) {
            $where = ' WHERE ' . $where;
        }
        $command = $this->createCommand("UPDATE {$table} SET {$fields}" . $where);
        $this->bindArrayValues($command, array_merge($data, $parameters));
        return $command;
    }