Seite 1 von 1

Problem mit DB-Abfragen

Verfasst: 30.12.2006 15:21
von CorniI
Hi
Ich habe ein Problem mit einer DBabfrage. Es erscheint immer

Code: Alles auswählen

Fatal error: Call to a member function sql_query() on a non-object in /home/corni/forencmsundco/LoDforumneu/phpbb2+153aohnectmitupi2db307/includes/functions_ranking.php on line 36
line 36 der betroffen Zeile:

Code: Alles auswählen

$sql="SELECT `user_id` , `username` , `user_posts` , `user_totaltime`
FROM ".USERS_TABLE;
if( !($result = $db->sql_query($sql)) )

	{

		message_die(CRITICAL_ERROR, "Could not query user information", "", __LINE__, __FILE__, $sql);

	}
Dies ist in einer include-datei, und in der Hauptdatei wird die common.php brav includet, eben so wie header+ footer.
Kann mir jemand helfen?
Corni
edit läßt sagen, das es in einr Funktion stattfindet
Ich habs :) ein einfaches global $db; wars :) Der Thread kann zu:)