|
楼主 |
发表于 2017-11-16 09:41:44
|
显示全部楼层
浙江省丽水市
<?php
include ("config.php");
?>
<?php
mysql_select_db("ttt", $con);
$result = mysql_query("SELECT * FROM show");
echo "<table border='1'>
<tr>
<th>ID</th>
<th>name</th>
<th>P1</th>
<th>P2</th>
<th>P3</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['ID'] . "</td>";
echo "<td>" . $row['name'] . "</td>";
echo "<td>" . $row['p1'] . "</td>";
echo "<td>" . $row['p2'] . "</td>";
echo "<td>" . $row['p3'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysql_close($con);
?>
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in D:\phpStudy\WWW\index.php on line 19
|
|