我在幫人升級 phpBB2 支援 PHP7,大部份的程式都改好了,只差 posting.php 和 includes/functions_post.php,一按『發表文章』時就會跳出錯誤訊息:
感覺問題很大,但是這個網站因為修改很多,我不敢冒然升級到 phpBB 3.2.4,想請教您有何建議? 可以直接拿 phpBB3 的 posting.php 和 functions_posting.php 改來用嗎? 謝謝。Error in posting
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 ' forum_topics = forum_topics + 1 WHERE forum_id = 1' at line 2
UPDATE phpbb_forums SET forum_posts = forum_posts + 1, forum_last_post_id = , forum_topics = forum_topics + 1 WHERE forum_id = 1
Line : 470
File : functions_post.php
ps. 我比對過 phpBB2 和 phpBB3 的 phpbb_posts 資料表,兩個欄位就不同,舊版有14個欄位,新版有29個欄位,而且新版沒有 phpbb_posts_text 資料表!而 phpbb_topics 舊版有 23個欄位,新版有38個欄位! (只能截三張圖,所以略過)