2014-09-24 28 views
0

我想從數據庫中選擇數據。我有一個名爲mail_header,與字段id,content.I只有一行數據在table.Mysql表是數據庫使用選擇查詢數據不完全從一個字段

使用這些選擇查詢

$header="select * from mail_header where id='1'"; 
$header2=mysql_query($header); 
$fet=mysql_fetch_array($header2); 
echo $fet['content']; 

表結構

+----+--------------------------+ 
| id | content    | 
+====+==========================+ 
| 1 | nextiva<nextiva.com> | 
+----+--------------------------+ 

回答

0

嘗試這種情況: 回波ヶ輛($ FET [ '內容']);

0

嘗試此:

$header="select * from mail_header"; 
$header2=mysql_query($header); 
while ($fet=mysql_fetch_array($header2)){ 
    echo htmlentities($fet['content']); 
} 
+0

作爲nextiva得到的內容,沒有得到nextiva ,沒有得到完整的情節 – 2014-09-24 05:45:18

+0

什麼是你的'內容'列的數據類型? – 2014-09-24 05:54:01

相關問題