src/ORM/Connect/DBQueryBuilder.php
public function buildUpdateFragment(SQLUpdate $query, array &$parameters)
    {
        $table = $query->getTable();
        $text = "UPDATE $table";

        // Join SET components together, considering parameters
        $parts = array();
        foreach ($query->getAssignments() as $column => $assignment) {
            // Assigment is a single item array, expand with a loop here
            foreach ($assignment as $assignmentSQL => $assignmentParameters) {
                $parts[] = "$column = $assignmentSQL";
                $parameters = array_merge($parameters, $assignmentParameters);
                break;
            }
        }
        $nl = $this->getSeparator();
        $text .= "{$nl}SET " . implode(', ', $parts);
        return $text;
    }
public function buildUpdateFragment(SQLUpdate $query, array &$parameters)
    {
        $table = $query->getTable();
        $text = "UPDATE $table";

        // Join SET components together, considering parameters
        $parts = array();
        foreach ($query->getAssignments() as $column => $assignment) {
            // Assigment is a single item array, expand with a loop here
            foreach ($assignment as $assignmentSQL => $assignmentParameters) {
                $parts[] = "$column = $assignmentSQL";
                $parameters = array_merge($parameters, $assignmentParameters);
                break;
            }
        }
        $nl = $this->getSeparator();
        $text .= "{$nl}SET " . implode(', ', $parts);
        return $text;
    }
public function buildUpdateFragment ( SQLUpdate $ query , array & $ parameters ) { $ table = $ query -> getTable ( ) ; $ text = "UPDATE $table" ; // Join SET components together, considering parameters $ parts = array ( ) ; foreach ( $ query -> getAssignments ( ) as $ column => $ assignment ) { // Assigment is a single item array, expand with a loop here foreach ( $ assignment as $ assignmentSQL => $ assignmentParameters ) { $ parts [ ] = "$column = $assignmentSQL" ; $ parameters = array_merge ( $ parameters , $ assignmentParameters ) ; break ; } } $ nl = $ this -> getSeparator ( ) ; $ text .= "{$nl}SET " . implode ( ', ' , $ parts ) ; return $ text ; }
Return the UPDATE clause ready for inserting into a query.

@param SQLUpdate $query The expression object to build from
@param array $parameters Out parameter for the resulting query parameters
@return string Completed from part of statement
Return the UPDATE clause ready for inserting into a query .