首頁  >  文章  >  後端開發  >  新手上路(关于mysql_fetch_array)

新手上路(关于mysql_fetch_array)

WBOY
WBOY原創
2016-06-23 13:42:521104瀏覽

include 'con_db.php';
$sqlsl="SELECT * FROM `phptestdb`.`inputtest`";
$dbdate=mysql_query($sqlsl)or die(mysql_error());
while($list=mysql_fetch_array($dbdate)){
?>


    
        
    
    
        
        
    

=$list[content]?> 
用户:=$list[user]?>  时间:=$list[date]?> 

___________________________________________________________________________________________________________________________________________________
测试提示:
undefined constant content - assumed 'content'
Use of undefined constant user - assumed 'user'
Use of undefined constant date - assumed 'date'

才刚上路,求知道的人指点,万分感谢!


回复讨论(解决方案)

=$list['content']?>
加上引号,其他类同

=$list['content']?>
加上引号,其他类同


谢谢,加了引号就好了。太粗心了
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn