public static function update($tableName, $whereClause, array $fields)
    {
        if ($tableName === '') {
            throw new \InvalidArgumentException('The table name must not be empty.', 1331315523);
        }

        self::enableQueryLogging();
        $dbResult = self::getDatabaseConnection()->exec_UPDATEquery(
            $tableName,
            $whereClause,
            $fields
        );
        if (!$dbResult) {
            throw new \Tx_Phpunit_Exception_Database(1334439755);
        }

        return self::getDatabaseConnection()->sql_affected_rows();
    }
public static function update($tableName, $whereClause, array $fields)
    {
        if ($tableName === '') {
            throw new \InvalidArgumentException('The table name must not be empty.', 1331315523);
        }

        self::enableQueryLogging();
        $dbResult = self::getDatabaseConnection()->exec_UPDATEquery(
            $tableName,
            $whereClause,
            $fields
        );
        if (!$dbResult) {
            throw new \Tx_Phpunit_Exception_Database(1334439755);
        }

        return self::getDatabaseConnection()->sql_affected_rows();
    }
public static function update ( $ tableName , $ whereClause , array $ fields ) { if ( $ tableName === '' ) { throw new \ InvalidArgumentException ( 'The table name must not be empty.' , 1331315523 ) ; } self :: enableQueryLogging ( ) ; $ dbResult = self :: getDatabaseConnection ( ) -> exec_UPDATEquery ( $ tableName , $ whereClause , $ fields ) ; if ( ! $ dbResult ) { throw new \ Tx_Phpunit_Exception_Database ( 1334439755 ) ; } return self :: getDatabaseConnection ( ) -> sql_affected_rows ( ) ; }
Executes an UPDATE query.

@param string $tableName
the name of the table to change, must not be empty
@param string $whereClause
the WHERE clause to select the records, may be empty
@param array $fields
key/value pairs of the fields to change, may be empty

@return int the number of affected rows, might be 0

@throws \InvalidArgumentException
@throws \Tx_Phpunit_Exception_Database if an error has occurred
Executes an UPDATE query .