src/bundles/Database/Builder.php
public function compile_update( &$query )
	{
		$build = 'update '.$this->escape_table( $query ).' set ';

		// add the array values.
		foreach( $query->values as $key => $value )
		{
			$build .= $this->escape( $key ).' = '.$this->param( $value ).', ';
		}

		$build = substr( $build, 0, -2 );
		$build .= $this->compile_where( $query );
		$build .= $this->compile_limit( $query );

		// cut the last comma away
		return $build;
	}
public function compile_update( &$query )
	{
		$build = 'update '.$this->escape_table( $query ).' set ';

		// add the array values.
		foreach( $query->values as $key => $value )
		{
			$build .= $this->escape( $key ).' = '.$this->param( $value ).', ';
		}

		$build = substr( $build, 0, -2 );
		$build .= $this->compile_where( $query );
		$build .= $this->compile_limit( $query );

		// cut the last comma away
		return $build;
	}
public function compile_update ( & $ query ) { $ build = 'update ' . $ this -> escape_table ( $ query ) . ' set ' ; // add the array values. foreach ( $ query -> values as $ key => $ value ) { $ build .= $ this -> escape ( $ key ) . ' = ' . $ this -> param ( $ value ) . ', ' ; } $ build = substr ( $ build , 0 , - 2 ) ; $ build .= $ this -> compile_where ( $ query ) ; $ build .= $ this -> compile_limit ( $ query ) ; // cut the last comma away return $ build ; }
Build an update query

@param Query     $query
@return string
Build an update query