ubuntu 10.10 + mysql + apache2+php5
이렇게 설치가 되어 있습니다.
설치방법은 그냥 다운받아서 설치하고 난 상태입니다.
mysql> use goods;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select * from goods;
±----±----------±---------±------+
| num | good | model | count |
±----±----------±---------±------+
| 1 | 냉장고 | R-B247GV | 2 |
±----±----------±---------±------+
1 row in set (0.02 sec)
mysql>
이렇게 되어 있는것을 웹에 표시할려고 합니다.
<?php
$host="localhost";
$id="root";
$pass="password";
$db="mydb";
$con = mysql_connect("localhost","root","*******");
mysql_select_db($db,$con);
$result = mysql_query("SELECT * FROM goods");
echo "<table border=‘1’>
<tr>
<th>num</th>
<th>good</th>
<th>model</th>
<th>count</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row[‘num’] . "</td>";
echo "<td>" . $row[‘good’] . "</td>";
echo "<td>" . $row[‘model’] . "</td>";
echo "<td>" . $row[‘count’] . "</td>";
echo "</tr>";
}
echo "</table>";
mysql_close($con);
?>
이렇게 코드를 짜봤으나. 표시되는건
num |good| model|count
이것만 나와서요.
내용을 불러오질 못 하는 이유가 어디에 있는지 알려주면 감사하겠습니다.