當安裝完畢 要在版面管理內在加新版面的話就會出現 :
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) VALUES ('4', '123', 1, '', 30, 0, 0,'[等你改],[]', 0, 0, 0, 0, 1, 1, 3, 3, 1, 1)
Line : 417
File : d:\appserv\www\phpbb2\admin\admin_forums.php
比對了一下 發現好像参數跟值沒有匹配到, 参數有17個 而數值有18個
發現原來裡面少了forum_topictypes
可是我有比對教學說明的步驟 內容也都沒問題 為何會發生這樣的情況呢....
代碼: 選擇全部
$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, forum_topictypes']) . ",'".str_replace("\'", "''", $HTTP_POST_VARS['topictypes'])."'".$value_sql . ")";