protected function translateUpdate()
    {
        $build = 'update ' . $this->escapeTable() . ' set ';

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

        // cut away the last comma and space
        $build = substr($build, 0, -2);

        // build the where statements
        if ($wheres = $this->attr('wheres'))
        {
            $build .= $this->translateWhere($wheres);
        }
    
        // build offset and limit
        if ($this->attr('limit'))
        {
             $build .= $this->translateLimit();
        }

        return $build;
    }
protected function translateUpdate()
    {
        $build = 'update ' . $this->escapeTable() . ' set ';

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

        // cut away the last comma and space
        $build = substr($build, 0, -2);

        // build the where statements
        if ($wheres = $this->attr('wheres'))
        {
            $build .= $this->translateWhere($wheres);
        }
    
        // build offset and limit
        if ($this->attr('limit'))
        {
             $build .= $this->translateLimit();
        }

        return $build;
    }
protected function translateUpdate ( ) { $ build = 'update ' . $ this -> escapeTable ( ) . ' set ' ; // add the array values. foreach ( $ this -> attr ( 'values' ) as $ key => $ value ) { $ build .= $ this -> escape ( $ key ) . ' = ' . $ this -> param ( $ value ) . ', ' ; } // cut away the last comma and space $ build = substr ( $ build , 0 , - 2 ) ; // build the where statements if ( $ wheres = $ this -> attr ( 'wheres' ) ) { $ build .= $ this -> translateWhere ( $ wheres ) ; } // build offset and limit if ( $ this -> attr ( 'limit' ) ) { $ build .= $ this -> translateLimit ( ) ; } return $ build ; }
Translate the current query to an SQL update statement

@return string
Translate the current query to an SQL update statement