SQL ERROR [ mysqli ]

Support zu den Modifikationen (MODs) von Entwickler OXPUS für das phpBB 3.0.x
Antworten
Sshadow
Beiträge: 9
Registriert: Di 25. Aug 2009, 02:55

SQL ERROR [ mysqli ]

Beitrag von Sshadow »

Hi, Let me first start by saying again what a great mod this is :) I first noticed this error back in ver.23 and have since upgraded to ver.25 but it still persists.

When i go to the ACP to perform a name change on a user I get the error message below. However the name change still takes effect. I get this every time and from the looks of the error it is caused somehow from this mod. Any help is appreciated.

Code: Alles auswählen

General Error
SQL ERROR [ mysqli ]

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2 [1064]

SQL

DELETE FROM dragonslair_dl_favorites WHERE fav_user_id =

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 163
CALL: dbal->sql_error()

FILE: includes/functions_user.php
LINE: 153
CALL: dbal_mysqli->sql_query()

FILE: includes/acp/acp_users.php
LINE: 812
CALL: user_update_name()

FILE: includes/functions_module.php
LINE: 507
CALL: acp_users->main()

FILE: adm/index.php
LINE: 80
CALL: p_master->load_active()
I have dug thru all these files and I think this is the line of code causing the problem. But your the expert :)

Code: Alles auswählen

	// Delete Download Favorites from this user
	$sql = "DELETE FROM " . DL_FAVORITES_TABLE . "
		WHERE fav_user_id = $user_id";
	$db->sql_query($sql);
Benutzeravatar
oxpus
Chief handy-man
Beiträge: 2719
Registriert: Do 13. Dez 2007, 23:06
Wohnort: Irgendwo im I-Net
Kontaktdaten:

Re: SQL ERROR [ mysqli ]

Beitrag von oxpus »

You have inserted this code block on the false position in includes/functions_user.php.
Please re-check the installation and find the position after

Code: Alles auswählen

	foreach ($table_ary as $table)
	{
		$sql = "DELETE FROM $table
			WHERE user_id = $user_id";
		$db->sql_query($sql);
	}

	$cache->destroy('sql', MODERATOR_CACHE_TABLE);
Hint about installing a MOD:
Allways search the next code in a file from the last position you've modded.
Do only search from the beginning of a file, when you will insert the first code in it!
So this is the reason you've inserted the code from the MOD on the wrong place and gets the sql error message.
Karsten Ude
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Sshadow
Beiträge: 9
Registriert: Di 25. Aug 2009, 02:55

Re: SQL ERROR [ mysqli ]

Beitrag von Sshadow »

Thank you very much. That fixed it. I kinda feel dumb but it was a lesson learned :) Thanks for the tips as well.
Antworten