public function update($table, array $data)
    {
        $conditions = array();

        foreach ($data as $key => $value) {
            // Wrap column names into back-ticks
            $conditions[] = sprintf('%s = %s', $this->quote($key), $value);
        }

        $query = sprintf('UPDATE %s SET %s', $this->quote($table), implode(', ', $conditions));
        $this->append($query);

        return $this;
    }
public function update($table, array $data)
    {
        $conditions = array();

        foreach ($data as $key => $value) {
            // Wrap column names into back-ticks
            $conditions[] = sprintf('%s = %s', $this->quote($key), $value);
        }

        $query = sprintf('UPDATE %s SET %s', $this->quote($table), implode(', ', $conditions));
        $this->append($query);

        return $this;
    }
public function update ( $ table , array $ data ) { $ conditions = array ( ) ; foreach ( $ data as $ key => $ value ) { // Wrap column names into back-ticks $ conditions [ ] = sprintf ( '%s = %s' , $ this -> quote ( $ key ) , $ value ) ; } $ query = sprintf ( 'UPDATE %s SET %s' , $ this -> quote ( $ table ) , implode ( ', ' , $ conditions ) ) ; $ this -> append ( $ query ) ; return $ this ; }
Builds UPDATE query

@param string $table
@param array $data Data to be updated
@return \Krystal\Db\Sql\QueryBuilder
Builds UPDATE query