Seite 1 von 1
Neuen Beriech erstellen
Verfasst: 27.02.2003 19:33
von Dr.Urlaub
wollte in einer untergruppe eine neue gruppe hinzufügen, dann bekam ich diesen fehler
Code: Alles auswählen
Couldn't insert row in forums table
DEBUG MODE
SQL Error : 1136 Column count doesn't match value count at row 1
INSERT INTO phpbb_forums (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_sticky, auth_announce, auth_vote, auth_pollcreate, auth_attachments, auth_download) VALUES ('33', 'Lob, Kritik und Anregungen', 7, '', 50, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 1, 1, 1, 1)
Line : 399
File : /data/members/free/tripod/de/d/r/u/drurlaub/htdocs/forum/admin/admin_forums.php
was kann ich dagegen machen?
Verfasst: 28.02.2003 11:12
von Acid
..zeig ma den entsprechenden INSERT INTO Block aus der admin_forums.php.
In der Values-Zeile scheint 1 Wert zu viel sein bzw. in der FIELD-Liste eines zu wenig.
Verfasst: 28.02.2003 16:36
von Dr.Urlaub
hoffe du meinst den
Code: Alles auswählen
// There is no problem having duplicate forum names so we won't check for it.
$sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ")
VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . ", " . intval($HTTP_POST_VARS['events_forum']) . $value_sql . ")";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert row in forums table", "", __LINE__, __FILE__, $sql);
}
if( $HTTP_POST_VARS['prune_enable'] )
{
if( $HTTP_POST_VARS['prune_days'] == "" || $HTTP_POST_VARS['prune_freq'] == "")
{
message_die(GENERAL_MESSAGE, $lang['Set_prune_data']);
}
$sql = "INSERT INTO " . PRUNE_TABLE . " (forum_id, prune_days, prune_freq)
VALUES('" . $next_id . "', " . intval($HTTP_POST_VARS['prune_days']) . ", " . intval($HTTP_POST_VARS['prune_freq']) . ")";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert row in prune 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;
Verfasst: 28.02.2003 22:23
von Acid
Was hast´n da versucht zu installieren ?
$sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ")
VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . ", " . intval($HTTP_POST_VARS['events_forum']) . $value_sql . ")";
(Entweder den roten Teil löschen oder nochma den Hack überprüfen..)