ich hab mal wieder ein kleines Problem bei Einbau von Categories & Forums icons und zwar stellt sich das Problem so dar, das der Mod mir folgende Fehlermeldung auswirft, wenn ich neue Kategorien oder Foren erstellen möchte =>
Code: Alles auswählen
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 ('testbox', 60, )
Line : 511
File : admin_forums.php
Code: Alles auswählen
case 'addcat':
// Create a category in the DB
if( trim($HTTP_POST_VARS['categoryname']) == '')
{
message_die(GENERAL_ERROR, "Can't create a category without a name");
}
$sql = "SELECT MAX(cat_order) AS max_order
FROM " . CATEGORIES_TABLE;
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't get order number from categories table", "", __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$max_order = $row['max_order'];
$next_order = $max_order + 10;
//
// 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;
case 'editcat':
//
// Show form to edit a category
//
$newmode = 'modcat';
$buttonvalue = $lang['Update'];
$cat_id = intval($HTTP_GET_VARS[POST_CAT_URL]);
$row = get_info('category', $cat_id);
$cat_title = $row['cat_title'];
$caticon = $row['cat_icon'];
$template->set_filenames(array(
"body" => "admin/category_edit_body.tpl")
);
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $newmode . '" /><input type="hidden" name="' . POST_CAT_URL . '" value="' . $cat_id . '" />';
$template->assign_vars(array(
'CAT_TITLE' => $cat_title,
'CAT_ICON' => $caticon,
'L_ICON' => $lang['Icon'],
'L_EDIT_CATEGORY' => $lang['Edit_Category'],
'L_EDIT_CATEGORY_EXPLAIN' => $lang['Edit_Category_explain'],
'L_CATEGORY' => $lang['Category'],
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_SUBMIT_VALUE' => $buttonvalue,
'S_FORUM_ACTION' => append_sid("admin_forums.$phpEx"))
);
$template->pparse("body");
break;
Kann mir jemand sagen, was dort schief läuft?????