Seite 1 von 1

Fehler beim "machen" einer neuen Kategorie

Verfasst: 28.09.2005 21:57
von 240709Gast
Hi. Seit neuestem kommt folgender fehler beim erstellen einer neuen Kategorie:
Couldn't insert row in categories table

DEBUG MODE

SQL Error : 1064 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

INSERT INTO phpbb_categories (cat_title, cat_order, cat_icon) VALUES ('lala', 40, )

Line : 513
File : admin_forums.php

Die entsprechenden Zeilen in der admin_forums.php sehen wie folgt aus:

Code: Alles auswählen

			//
			// There is no problem having duplicate forum names so we won't check for it.
			//
			$sql = "INSERT INTO " . CATEGORIES_TABLE . " (cat_title, cat_order, cat_icon)
				VALUES ('" . str_replace("\'", "''", $HTTP_POST_VARS['categoryname']) . "', $next_order, $caticon)";
			if( !$result = $db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, "Couldn't insert row in categories table", "", __LINE__, __FILE__, $sql);
			}

			$message = $lang['Forums_updated'] . "<br /><br />" . sprintf($lang['Click_return_forumadmin'], "<a href=\"" . append_sid("admin_forums.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");

			message_die(GENERAL_MESSAGE, $message);

			break;

Letzter MOD mit DB-Änderung den ich eingebaut hab ist der Attachment-Mod...


Hoff mal ihr könnt mir helfen!



mfg, Cold

Verfasst: 28.09.2005 23:23
von fanrpg
suche:

Code: Alles auswählen

$sql = "INSERT INTO " . CATEGORIES_TABLE . " (cat_title, cat_order, cat_icon) 
            VALUES ('" . str_replace("\'", "''", $HTTP_POST_VARS['categoryname']) . "', $next_order, $caticon)";
füge davor ein:

Code: Alles auswählen

if($caticon == "")
{
$caticon = "''";
}

Verfasst: 29.09.2005 12:14
von 240709Gast
Jo super danke!



mfg, Cold

Verfasst: 26.08.2006 10:16
von kayline
Cold hat geschrieben:Jo super danke!



mfg, Cold
Perfekte Hilfe! Heißen Dank auch von mir :wink: