public function update($table, array $data, array $conditions)
    {
        $table = $this->getTable($table);
        $set = $this->buildSqlObject($data, ', ');
        $where = $this->buildSqlObject($conditions, ' AND ');

        $query = "UPDATE $table SET $set WHERE $where";
        $params = array_merge(array_values($data), array_values($conditions));
        return $this->executeUpdate($query, $params);
    }
public function update($table, array $data, array $conditions)
    {
        $table = $this->getTable($table);
        $set = $this->buildSqlObject($data, ', ');
        $where = $this->buildSqlObject($conditions, ' AND ');

        $query = "UPDATE $table SET $set WHERE $where";
        $params = array_merge(array_values($data), array_values($conditions));
        return $this->executeUpdate($query, $params);
    }
public function update ( $ table , array $ data , array $ conditions ) { $ table = $ this -> getTable ( $ table ) ; $ set = $ this -> buildSqlObject ( $ data , ', ' ) ; $ where = $ this -> buildSqlObject ( $ conditions , ' AND ' ) ; $ query = "UPDATE $table SET $set WHERE $where" ; $ params = array_merge ( array_values ( $ data ) , array_values ( $ conditions ) ) ; return $ this -> executeUpdate ( $ query , $ params ) ; }
Executes a UPDATE query

@param string $table The name of table
@param array $data An associative array containing column-value pairs
@param array $conditions The conditions to search records
@return int The number of affected rows
Executes a UPDATE query