public function update($columns)
    {
        $update = array();
        foreach ($columns as $k => $v) {
            $update[] = "`$k` = :$k";
            $this->params[":$k"] = $v;
        }
        $update = implode(", ", $update);
        $q = "UPDATE {$this->table} as `t` {$this->join} SET $update WHERE {$this->condition}";
        if ($this->limit) {
            $q .= " LIMIT {$this->limit}";
        }
        return $this->connection->execQuery($q, $this->params);
    }
public function update($columns)
    {
        $update = array();
        foreach ($columns as $k => $v) {
            $update[] = "`$k` = :$k";
            $this->params[":$k"] = $v;
        }
        $update = implode(", ", $update);
        $q = "UPDATE {$this->table} as `t` {$this->join} SET $update WHERE {$this->condition}";
        if ($this->limit) {
            $q .= " LIMIT {$this->limit}";
        }
        return $this->connection->execQuery($q, $this->params);
    }
public function update ( $ columns ) { $ update = array ( ) ; foreach ( $ columns as $ k => $ v ) { $ update [ ] = "`$k` = :$k" ; $ this -> params [ ":$k" ] = $ v ; } $ update = implode ( ", " , $ update ) ; $ q = "UPDATE {$this->table} as `t` {$this->join} SET $update WHERE {$this->condition}" ; if ( $ this -> limit ) { $ q .= " LIMIT {$this->limit}" ; } return $ this -> connection -> execQuery ( $ q , $ this -> params ) ; }
Update selected columns and return the number of affected rows.
@param $columns
@return int
Update selected columns and return the number of affected rows .