2010-08-05 93 views
1

我試圖從PHP數據庫中使用PHP獲取數據,目前沒有運氣,我不知道爲什麼。無法使用PHP從MySQL中獲取

<?php 

include "base.php"; 

$CurrentID = 1; 

$Message = mysql_query("SELECT Message FROM wall WHERE MessageID = 1"); 

$MessageFetch = mysql_fetch_assoc($Message); 

echo $_MessageFetch['Message'] 

?> 

數據庫:

alt text http://img204.imageshack.us/img204/844/screenshot20100805at013.png

+1

當回聲$消息返回資源ID 4 – ritch 2010-08-05 00:37:28

回答

2

有一個額外的下劃線:

$_MessageFetch 

echo $_MessageFetch['Message'] 

應該

echo $MessageFetch['Message'] 
+0

感謝您對本。 – ritch 2010-08-05 01:13:27