<分区>
Possible Duplicate:
PHP: “Notice: Undefined variable” and “Notice: Undefined index”
我是 PHP 和 mySQL 的新手,这是我程序的一部分,但发生的事情是它没有从数据库返回“文本”列的值,而是显示“ undefined index ”文本''。我 100% 确定它存在于数据库中。有人可以帮帮我吗?
$method_get_article = "SELECT TEXT FROM ARTICLE WHERE UID = '$user_id' LIMIT 1";
$get_article = mysql_query($method_get_article, $conn) or die (mysql_error());
$article = mysql_fetch_array($get_article);**strong text**
$text = $article['Text'];
//$row = mysql_fetch_assoc($get_article);
//$text = $row['Text'];
echo $text;