I am grouping the model field in cars table ,but i am getting only one,one result ,istead of all , from each differend grouped by models.
suppose there are three 1990,19190,1990 under moldel field and three cars suzuki,honda,tyota are undel car_name whose model is 1990 .but I am getting results of only one car name under 1990 model. Plz help me.
$sql=mysql_query("SELECT * FROM cars group by model ");
while ($row=mysql_fetch_array($sql)) {
$car_name=$row['car_name'];
$model=$row['model'];
?>
<table>
<tr>
<td><?php echo $model ?></td> //here is displaying 1990.
</tr >
<tr >
<td> <?php echo $car_name; ?></td> // but here is displayed only onr car name istead of all.
</tr>
</table>
<?php
}