irm-1.6-b3/lib/IRMDB.php
/** Attempt to determine the version of the currently connected database.
	 * Returns the version (as a string) of the database if we can work it
	 * out, or false if it doesn't appear to be an IRM database.
	 */
Attempt to determine the version of the currently connected database.
Returns the version (as a string) of the database if we can work it
out, or false if it doesn't appear to be an IRM database.
Attempt to determine the version of the currently connected database . Returns the version ( as a string ) of the database if we can work it out or false if it doesn ' t appear to be an IRM database .
function GetDatabaseVersion()
	{
		$this->_dbh->pushErrorHandling(PEAR_ERROR_RETURN);
		$curver = $this->_dbh->getOne("SELECT value FROM config WHERE variable='dbver'");
		if (MDB::isError($curver))
		{
			$curver = $this->_dbh->getOne("SELECT version FROM config");
			if (MDB::isError($curver) && $curver->getCode() == MDB_ERROR_NOSUCHTABLE)
			{
				$curver = $this->_dbh->getOne("SELECT number FROM version");
			}
		}
		if (MDB::isError($curver))
		{
			return false;
		}
		else
		{
			return $curver;
		}
	}
function GetDatabaseVersion ( ) { $ this -> _dbh -> pushErrorHandling ( PEAR_ERROR_RETURN ) ; $ curver = $ this -> _dbh -> getOne ( " SELECT value FROM config WHERE variable='dbver' " ) ; if ( MDB :: isError ( $ curver ) ) { $ curver = $ this -> _dbh -> getOne ( " SELECT version FROM config " ) ; if ( MDB :: isError ( $ curver ) && $ curver -> getCode ( ) == MDB_ERROR_NOSUCHTABLE ) { $ curver = $ this -> _dbh -> getOne ( " SELECT number FROM version " ) ; } } if ( MDB :: isError ( $ curver ) ) { return false ; } else { return $ curver ; } }
Attempt to determine the version of the currently connected database.
Attempt to determine the version of the currently connected database .
// 1.5.2+ // Covers most versions // Pre 1.3.1