function LastInsertId ($table)
	{
		$last_insert = @PGSQL::FetchCell("SELECT currval('{$table}_id_seq') AS id;");
		if ($last_insert)
			return $last_insert;
		
		return false;
	}
	function FetchCell ($query)
	{
		if (DATABASE_TYPE == "PGSQL")
		{
			return PGSQL::FetchCell ($query);
		}
		elseif (DATABASE_TYPE == "MYSQL")
		{
			return MySQL::FetchCell ($query);
		}
	}