无法使用PHP从MySQL中获取

无法使用PHP从MySQL中获取

问题描述:

我试图从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

有一个额外的下划线:

$_MessageFetch 

echo $_MessageFetch['Message'] 

应该

echo $MessageFetch['Message'] 
+0

感谢您对本。 – ritch 2010-08-05 01:13:27