Topic: problems with modifying phpbb forum (Read 701 times)
aka J Love Community Supporter?
Bill Gates is my home boy
Gender:
Posts: 884
1636 credits Members referred : 4
« on: Apr 08, 2006, 11:38:18 PM »
i am installing a mod for phpbb, if you are familiar with it, it comes from phpbbhacks.com. when trying to create a new forum after making the necessary changes, it disallows me from creating the forum due to a mysql error. here is the error mysql gives us:
Quote
General Error Couldn't insert row in forums table
DEBUG MODE
SQL Error : 1136 Column count doesn't match value count at row 1
/*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/
if( $mode == "addforum" ) { list($cat_id) = each($HTTP_POST_VARS['addforum']); $cat_id = intval($cat_id); // // stripslashes needs to be run on this because slashes are added when the forum name is posted // $forumname = stripslashes($HTTP_POST_VARS['forumname'][$cat_id]); } }
if( !empty($mode) ) { switch($mode) { case 'addforum': case 'editforum': // // Show form to create/modify a forum // if ($mode == 'editforum') { // $newmode determines if we are going to INSERT or UPDATE after posting?
case 'createforum': // // Create a forum in the DB // if( trim($HTTP_POST_VARS['forumname']) == "" ) { message_die(GENERAL_ERROR, "Can't create a forum without a name"); }
$sql = "SELECT MAX(forum_order) AS max_order FROM " . FORUMS_TABLE . " WHERE cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]); if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Couldn't get order number from forums table", "", __LINE__, __FILE__, $sql); } $row = $db->sql_fetchrow($result);
$max_order = $row['max_order']; $next_order = $max_order + 10; $sql = "SELECT MAX(forum_id) AS max_id FROM " . FORUMS_TABLE; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Couldn't get order number from forums table", "", __LINE__, __FILE__, $sql); } $row = $db->sql_fetchrow($result);