public function prepareUpdate($table, array $values) {

        // Initialize the SET.
        $set = [];
        foreach ($values as $k => $v) {
            $set[] = "`" . $k . "` = " . $v;
        }

        // Initialize the query.
        $query = [];

        $query[] = "UPDATE ";
        $query[] = $table;
        $query[] = " SET ";
        $query[] = implode(", ", $set);

        // Return the query.
        return implode("", $query);
    }
public function prepareUpdate($table, array $values) {

        // Initialize the SET.
        $set = [];
        foreach ($values as $k => $v) {
            $set[] = "`" . $k . "` = " . $v;
        }

        // Initialize the query.
        $query = [];

        $query[] = "UPDATE ";
        $query[] = $table;
        $query[] = " SET ";
        $query[] = implode(", ", $set);

        // Return the query.
        return implode("", $query);
    }
public function prepareUpdate ( $ table , array $ values ) { // Initialize the SET. $ set = [ ] ; foreach ( $ values as $ k => $ v ) { $ set [ ] = "`" . $ k . "` = " . $ v ; } // Initialize the query. $ query = [ ] ; $ query [ ] = "UPDATE " ; $ query [ ] = $ table ; $ query [ ] = " SET " ; $ query [ ] = implode ( ", " , $ set ) ; // Return the query. return implode ( "" , $ query ) ; }
Prepare an UPDATE SQL query.

@param string $table The table.
@param array $values The values [field => value]
@return string Returns the UPDATE SQL query.
Prepare an UPDATE SQL query .