Horde_Db_Adapter_Base::updateBlob PHP Метод

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

Updates rows including BLOBs into a table.
public updateBlob ( string $table, array $fields, string | array $where = null )
$table string The table name.
$fields array A hash of column names and values. BLOB columns must be provided as Horde_Db_Value_Binary objects.
$where string | array A WHERE clause. Either a complete clause or an array containing a clause with placeholders and a list of values.
    public function updateBlob($table, $fields, $where = null)
    {
        if (is_array($where)) {
            $where = $this->_replaceParameters($where[0], $where[1]);
        }
        $fnames = array();
        foreach (array_keys($fields) as $field) {
            $fnames[] = $this->quoteColumnName($field) . ' = ?';
        }
        $query = sprintf('UPDATE %s SET %s%s', $this->quoteTableName($table), implode(', ', $fnames), strlen($where) ? ' WHERE ' . $where : '');
        return $this->update($query, $fields);
    }