第 1 頁 (共 1 頁)
[求救]SQL刪錯....(已解決)
發表於 : 2005-04-10 15:54
由 幽雲
不小心刪錯SQL....導致出現這個:
Could not query categories list
DEBUG MODE
SQL Error : 1146 Table 'practk_phpbb1.phpbb_categories' doesn't exist
SELECT c.cat_id, c.cat_title, c.cat_order FROM phpbb_categories c ORDER BY c.cat_order
Line : 118
File : index.php
請問有方法補救嗎= =?
發表於 : 2005-04-10 16:01
由 Mac
除非你記得你所有的分區 ID 和名稱,這樣子你就可以把資料表寫出來
~Mac
發表於 : 2005-04-10 16:03
由 幽雲
Mac 寫:除非你記得你所有的分區 ID 和名稱,這樣子你就可以把資料表寫出來
~Mac
不是全部記得耶-.-
如果不記得就要重架了嗎?????(精神崩潰)
還是.....?
發表於 : 2005-04-10 17:27
由 Mac
看一下 phpbb_forums 資料表的內容
看有哪一些 cat_id,就在 phpbb_categories 增加幾筆資料
~Mac
發表於 : 2005-04-15 20:27
由 幽雲
Mac 寫:看一下 phpbb_forums 資料表的內容
看有哪一些 cat_id,就在 phpbb_categories 增加幾筆資料
~Mac
我找到phpbb_forums 資料表了...
可是怎麼增加sql?(也看到cat_id)可是不知道要怎麼增加@@"
發表於 : 2005-04-15 20:43
由 ~倉木麻衣~
既然連phpbb_categories資料表都不見了
那第一步應該是先重建phpbb_categories吧?
phpbb_categories的結構可以從phpbb壓縮檔裡的install/schemas/mysql_schema.sql裡找到\r
內容如下
代碼: 選擇全部
CREATE TABLE phpbb_categories (
cat_id mediumint(8) UNSIGNED NOT NULL auto_increment,
cat_title varchar(100),
cat_order mediumint(8) UNSIGNED NOT NULL,
PRIMARY KEY (cat_id),
KEY cat_order (cat_order)
);
先到phpMyAdmin裡選擇你的資料庫~
然後再執行上面的sql建立資料表\r
最後就是Mac講的~
Mac 寫:看一下 phpbb_forums 資料表的內容
看有哪一些 cat_id,就在 phpbb_categories 增加幾筆資料
例如:
代碼: 選擇全部
INSERT INTO phpbb_categories (cat_id, cat_title, cat_order) VALUES (1, 'Test category 1', 10);
特別注意的是cat_order是指分區的排列順序~
沒錯的話~系統是每次增加10
所以第二筆分區記錄的cat_order應該是20~以此類推\r
等全建好後~可以再到後台去調整分區的位置
發表於 : 2005-04-16 07:23
由 幽雲
已修好了..
感謝兩位的幫忙