<?
mysql_select_db("goods", $con);
$result = mysql_fetch_array(mysql_query("SELECT good, model, sum(count) as count FROM goods group by good, model"));
$result2 = mysql_fetch_array(mysql_query("SELECT good, model, sum(count) as count FROM outgoods group by good, model"));
echo "<table border=‘1’>
<tr>
전체상품, 모델, 개수를 나타냅니다.
</tr>
<tr>
<th>상품</th>
<th>모델</th>
<th>개수</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row[‘good’] . "</td>";
echo "<td>" . $row[‘model’] . "</td>";
if ($result[‘model’]==$result2[‘model’])
{
$value = $result[‘count’]- $result2[‘count’];
echo "<td>" . $row[‘count’] . "</td>";
}
else
echo "<td>" . $row[‘count’] . "</td>";
echo "</tr>";
}
echo "</table>";
echo ("<br><a href=‘g_main.php’> main go to</a>");
mysql_close($con);
?>
이렇게 하면요.
에러가 떠서
while문에서 자꾸 에러가 나오는데욥 어떻게 고쳐야되는지 도저히 몰라서
여기의 문의합니다.