1 頁 (共 1 頁)

[問題]Nutport 1.0b3 中文版 資料庫問題!

發表於 : 2003-12-21 22:30
J‧駿
問題外掛:Nutport 1.0b3 中文版
參考連結:http://phpbb-tw.net/phpbb/viewtopic.php?t=21726
使用版本:phpBB 2.0.5
網站位置:http://taywe.net/jweb/HL/portal.php
狀況描述:

設定一開始很正常
過一陣子後
在後台設定細節
出來"突然"就出現這些文字

Couldn't obtain news information

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 'AND t.topic_poster = u.user_id AND p.post_id = t.topic_first

SELECT t.*, u.username, u.user_id, p.*, x.* FROM phpbb_topics t, phpbb_users u, phpbb_posts p, phpbb_posts_text x WHERE t.forum_id = AND t.topic_poster = u.user_id AND p.post_id = t.topic_first_post_id AND x.post_id = t.topic_first_post_id ORDER BY t.topic_time DESC

Line : 293
File : d:\windows2003service\www\jweb\hl\portal.php

變這樣了...

http://taywe.net/jweb/HL/portal.php


之前明明都很正常...



請問是不是資料庫出問題了?
如果是的話\r
我該如何刪掉資料庫裡安裝"入口網頁"的東西呢?



麻煩會的人教教我

在這裡先說聲謝謝!

發表於 : 2003-12-22 03:14
messagebox
SELECT t.*, u.username, u.user_id, p.*, x.* FROM phpbb_topics t, phpbb_users u, phpbb_posts p, phpbb_posts_text x WHERE t.forum_id = AND t.topic_poster = u.user_id AND p.post_id = t.topic_first_post_id AND x.post_id = t.topic_first_post_id ORDER BY t.topic_time DESC

t.forum_id要跟哪個值比對呢??
檢查一下後面是不是少了什麼~~
是不是變數沒拿到~還是你少輸入了什麼~~

剛剛去下載了MOD的檔案~
原檔案處應為\r
WHERE t.forum_id = $page_forum
很明顯的~~
你並沒有拿到$page_forum的值~

發表於 : 2003-12-22 07:12
Sirius Black
我記得資料庫應該會自動新增
去phpmyadmin看看...是否有phpbb_portal

可以用以下語法手動新增資料庫\r

代碼: 選擇全部

<?php  
 /***************************************************************************  
 * nutport_install_sql.php  
 * -------------------  
 *  
 *  
 ***************************************************************************/  
  
 /***************************************************************************  
 *  
  
 define('IN_PHPBB', true);  
 $phpbb_root_path = './';  
 include($phpbb_root_path . 'extension.inc');  
 include($phpbb_root_path . 'common.'.$phpEx);  
  
 //  
 // Start session management  
 //  
 $userdata = session_pagestart($user_ip, PAGE_INDEX);  
 init_userprefs($userdata);  
 //  
 // End session management  
 //  
  
  
 if( !$userdata['session_logged_in'] )  
 {  
 $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';  
 header($header_location . append_sid("login.$phpEx?redirect=db_update.$phpEx", true));  
 exit;  
 }  
  
 if( $userdata['user_level'] != ADMIN )  
 {  
 message_die(GENERAL_MESSAGE, 'You are not authorised to access this page');  
 }  
  
  
 $page_title = 'Updating the database';  
 include($phpbb_root_path . 'includes/page_header.'.$phpEx);  
  
 echo '<table width="100%" cellspacing="1" cellpadding="2" border="0" class="forumline">';  
 echo '<tr><th>Updating the database</th></tr><tr><td><span class="genmed"><ul type="circle">';  
  
  
 $sql = array();  
 $sql[] = "CREATE TABLE " . $table_prefix . "portal (  
 portal_id mediumint(8) auto_increment NOT NULL,  
 portal_order mediumint(8) NOT NULL,  
 portal_title varchar(60) NOT NULL,  
 portal_description text NULL,  
 portal_bbcode_id varchar(10) NOT NULL,  
 portal_use_url tinyint(1) NULL,  
 portal_forum mediumint(8) NOT NULL,  
 portal_url varchar(250) NOT NULL,  
 portal_list_limit mediumint(8) NOT NULL,  
 portal_ascending tinyint(1) NULL,  
 portal_nodate tinyint(1) NULL,  
 portal_button_name varchar(100) NOT NULL,  
 portal_button_image varchar(100) NOT NULL,  
 portal_navbar tinyint(1) NULL,  
 portal_login tinyint(1) NULL,  
 portal_online tinyint(1) NULL,  
 portal_latest tinyint(1) NULL,  
 portal_poll tinyint(1) NULL,  
 PRIMARY KEY (portal_id)  
 )";  
  
 for( $i = 0; $i < count($sql); $i++ )  
 {  
 if( !$result = $db->sql_query ($sql[$i]) )  
 {  
 $error = $db->sql_error();  
  
 echo '<li>' . $sql[$i] . '<br /> +++ <font color="#FF0000"><b>Error:</b></font> ' . $error['message'] . '</li><br />';  
 }  
 else  
 {  
 echo '<li>' . $sql[$i] . '<br /> +++ <font color="#00AA00"><b>Successfull</b></font></li><br />';  
 }  
 }  
  
  
 echo '</ul></span></td></tr><tr><td class="catBottom" height="28">&</td></tr>';  
  
 echo '<tr><th>End</th></tr><tr><td><span class="genmed">Installation is now finished. Please be sure to delete this file now.<br />If you have run into any errors, please visit the <a href="http://www.phpbbhacks.com/forums" target="_phpbbhacks">phpBBHacks.com support forums</a> and ask someone for help.</span></td></tr>';  
 echo '<tr><td class="catBottom" height="28" align="center"><span class="genmed"><a href="' . append_sid("index.$phpEx") . '">Have a nice day</a></span></td></table>';  
  
 include($phpbb_root_path . 'includes/page_tail.'.$phpEx);  
  
 ?>
 
  

發表於 : 2003-12-22 07:13
Sirius Black
別忘了要到 系統管理控制台 去設定入口頁喔

發表於 : 2003-12-22 19:26
J‧駿
我剛剛檢查後
發現的確是有phpbb_portal 檔在資料庫\r

原本是想說 乾脆珊掉他 重新安裝在資料庫\r
但是後來珊掉之後
我不知道怎樣安裝了= =
之前好像第一次設定後台的"入口網頁"它會有自動安裝的程序吧!
現在要怎樣才會讓那個程序出來呢?

上面給我的那些語法
請問要如何使用?
應該不是放在SQL的地方吧\r

那應該要怎麼應用呢??

對不起..小的不才= ="

發表於 : 2003-12-22 20:14
Sirius Black
用記事本存成 .php 檔

然後放在你的phpbb資料夾\r

用瀏覽器連到那個檔案

更新完後把那個檔案殺了

**完成**

發表於 : 2003-12-22 20:18
Sirius Black
更新完了要去 控制台 然後開創新的入口頁

這樣應該就OK了!

發表於 : 2003-12-24 06:03
J‧駿
謝謝你
我已經成功了

不過你那篇php文件的第9行"/*************"是多餘的
多了會失敗
我把他刪除掉就成功了
^^