我在我的數據庫(probe_config)中有一個表(webmeasurementsuite)。我寫了一個php編碼從數據庫檢索數據並將其顯示在html表中。糾正我的錯誤please.when我加載到瀏覽器的PHP頁面,我得到一個空白頁。 $ conn = mysql_connect(「localhost」,「root」,「mysql」);
if(!$ con)
{
die('Could not connect:'。mysql_error());
}在單個html表中檢索兩個數據庫表值
mysql_select_db(「my_db」,$ con);
$ result = mysql_query(「SELECT * FROM webmeasurementsuite」);
回聲「<table border='1'>
<tr>
<th>
複製</th>
<th>
等待</th>
<th>
超時</th>
<th>
clearcache </th>
<th>
名</th>
<th>
wms </th>
</tr>
;
而($行= mysql_fetch_array($結果))
{
回聲 「<tr>
」;
echo「<td>
」。 $ row ['replication']。 「</td>
」;
echo「<td>
」。 $ row ['wait']。 「</td>
」;
echo「<td>
」。 $ row ['timeout']。 「</td>
」;
echo「<td>
」。 $ row ['clearcache']。 「</td>
」;
echo「<td>
」。 $ row ['name']。 「</td>
」;
echo「<td>
」。 $ row ['wms']。 「</td>
」;
echo「</tr
>」;
}
echo「</table>
」;
mysql_close($ con);
?>
你需要更加精確。請讓它更容易幫助你。將代碼粘貼到此處,並明確告訴我們您遇到的問題。否則它將被關閉爲'不是問題' – 2011-03-17 07:22:58
如果有其他問題需要回答這個問題,請讓我知道 – 2011-03-17 08:59:47