SQL Error : 1110 Column 'forum_count_posts' specified twice

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Antworten
M3lloW
Mitglied
Beiträge: 107
Registriert: 23.05.2007 15:20

SQL Error : 1110 Column 'forum_count_posts' specified twice

Beitrag von M3lloW »

Grüße


Seitdem ich den post count mod eingebaut habe bekomm ich den error und kann keine Kategorien mehr anlegen und Foren es folgt die Message
in der admin_forums:

SQL Error : 1110 Column 'forum_count_posts' specified twice

die datei sieht folgendermasen aus:

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, forum_enter_limit, forum_count_posts, forum_bedankomat, prune_enable ,forum_count_posts" . $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['forum_enter_limit']) . " , " . intval($HTTP_POST_VARS['count_posts']) . " , " . intval($HTTP_POST_VARS['forum_bedankomat']) . " , " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ", " . intval($HTTP_POST_VARS['forum_count_posts']). ")";
			if( !$result = $db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, "Couldn't insert row in forums table", "", __LINE__, __FILE__, $sql);
			}
Von SQL habe ich leider kein plan aber was ich schon rausgelesen hab ist das der command forum count posts doppelt vorhanden ist. Wenn ich den 2. rausnehme folgt :

SQL Error : 1136 Column count doesn't match value count at row 1

nun sieht die datei folgendermasen aus:

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, forum_enter_limit, forum_count_posts, forum_bedankomat, prune_enable ,forum_count_posts" . $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['forum_enter_limit']) . " , " . intval($HTTP_POST_VARS['forum_bedankomat']) . " , " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ", " . intval($HTTP_POST_VARS['forum_count_posts']). ")";
			if( !$result = $db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, "Couldn't insert row in forums table", "", __LINE__, __FILE__, $sql);
			}
wäre nett wenn mir jemmand helfen könnte
M3lloW
Mitglied
Beiträge: 107
Registriert: 23.05.2007 15:20

Beitrag von M3lloW »

weis keiner was? :oops:
Benutzeravatar
Dr.Death
Moderator
Moderator
Beiträge: 17476
Registriert: 23.04.2003 08:22
Wohnort: Xanten
Kontaktdaten:

Beitrag von Dr.Death »

Da war noch ein doppelter Eintrag drin ;-)

Versuche es mal so:

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, forum_enter_limit, forum_bedankomat, prune_enable ,forum_count_posts" . $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['forum_enter_limit']) . " , " . intval($HTTP_POST_VARS['forum_bedankomat']) . " , " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ", " . intval($HTTP_POST_VARS['forum_count_posts']). ")"; 
         if( !$result = $db->sql_query($sql) ) 
         { 
            message_die(GENERAL_ERROR, "Couldn't insert row in forums table", "", __LINE__, __FILE__, $sql); 
         }
M3lloW
Mitglied
Beiträge: 107
Registriert: 23.05.2007 15:20

Beitrag von M3lloW »

Bessten Dank hat einwandfrei funktioniert , tip top! :D
Antworten

Zurück zu „phpBB 2.0: Mod Support“