All pastes #416722 Raw Edit

Miscellany

public text v1 · immutable
#416722 ·published 2007-03-30 12:16 UTC
rendered paste body
		//Try to create and drop a dummy table (with appropriate prefix)
		@$db->Execute('DROP TABLE ' . $db_prefix . 'dummyinstall');
		$result = $db->Execute('CREATE TABLE ' . $db_prefix . 'dummyinstall (i int)');
		if ($result)
		{
			$result = $db->Execute('DROP TABLE ' . $db_prefix . 'dummyinstall');
			if (!$result)
			{
				//could not drop table
				showPageThree('Could not drop a table.  Verify that the user has privileges to drop tables in the given database.');
				return;
			}
		}
		else
		{
			//could not create table
			showPageThree('Could not create a table.  Verify that the user has privileges to create tables in the given database.');
			return;
		}