瀏覽單個文章
majo
Major Member
 

加入日期: Oct 2003
文章: 136
我想請問一條php錯誤的訊息...

可以的話我想請問下面的錯誤訊息是什麼意思...

Warning: Supplied argument is not a valid MySQL result resource in c:\apache\htdocs\index.php on line 14

自己翻譯...
提供的數據不是根據MYSQL導致錯誤...在14行

問題是我自己keyin的程式碼和書上範例一樣
一樣的伺服器,一樣資料庫,他行,我不行...

所以我向問這條錯誤訊息的意思,看看我到哪裡錯了

該檔案
其中index.php是我做的,-index.php是書上的範例

另外 Dreamweaver 說14行是while( ){ } 那行
可是我算不是,是 $str 那行
====程式碼=====
01.<meta http-equiv="Content-Type" content="text/html; charset=big5">
02.<html><head><title>我 第一個討論區</title></head>
03.<body>
04
05.<a href="input.php">我要發言</a><p>
06.<table border="1" align="center">
07.<tr><td>發佈時間</td><td>討論主題</td><td>發佈人</td><td>人氣指數</td></tr>
10
11.<?
12.$link=mysql_connect("localhost","gbookgod","123456");
13.mysql_select_db("_gbook",$link);
14.$str="select serial,time,title,count,name,email from disscuss order by time desc,serial,desc";
15.$list=mysql_query($str,$link);
16.while(list($serial,$time,$title,$count,$name,$email)=mysql_fetch_row($list)){
17.echo "<tr>111</tr>";}
18.mysql_close($link);
19.?>
20.</table>
21.</body>
22.</html>
=============
     
      
舊 2005-07-11, 09:55 AM #1
回應時引用此文章
majo離線中