irm5/include/DBI/DBI.php
/** Create an update query and run it on the database.
     * Similar in concept to the autoExecute method in PEAR::DB --
     * take an assoc. array of field => value pairs in $values, and create
     * an UPDATE $table query from that.
     * Any criteria to select which records to update should be specified
     * in $where.
     */
Create an update query and run it on the database.
Similar in concept to the autoExecute method in PEAR::DB
take an assoc. array of field => value pairs in $values, and create
an UPDATE $table query from that.
Any criteria to select which records to update should be specified
in $where.
Create an update query and run it on the database . Similar in concept to the autoExecute method in PEAR :: DB take an assoc . array of field = > value pairs in $values and create an UPDATE $table query from that . Any criteria to select which records to update should be specified in $where .
function UpdateQuery($table, $values, $where = NULL)
    {
        $fields = array();
        foreach ($values as $key => $value)
        {
            $fields[] = "$key=".$this->_dbh->getTextValue($value);
        }
        $fields = join(',', $fields);
        if ($where !== NULL)
        {
            $where = "WHERE $where";
        }
        $query = "UPDATE $table SET $fields $where";
        $this->query($query);
    }
function UpdateQuery ( $ table , $ values , $ where = NULL ) { $ fields = array ( ) ; foreach ( $ values as $ key => $ value ) { $ fields [ ] = " $ key = " . $ this -> _dbh -> getTextValue ( $ value ) ; } $ fields = join ( ',' , $ fields ) ; if ( $ where !== NULL ) { $ where = " WHERE  $ where " ; } $ query = " UPDATE  $ table  SET  $ fields $ where " ; $ this -> query ( $ query ) ; }
Create an update query and run it on the database.
Create an update query and run it on the database .
// The list of fields in the query