Hello Reader,
I'm attempting to build a web page to display a listing of all the models we carry. The problem is that the list is very repetative. It displays the Manufacture and model number for every record.
What I would like to do is Display it by Manufacturer with a <br> or two in between.
This is the code I use:
$resultstring="SELECT MdlLst.MdlNum, ManfLst.Manf FROM ManfLst RIGHT JOIN MdlLst ON ManfLst.ID = MdlLst.ManfLst_ID ORDER BY ManfLst.Manf, MdlLst.MdlNum;";
$result = mysql_query($resultstring);
if (!$result) { echo("<p>Error Displaying Model Listing. Please Contact Web Master.</p>"); exit();}
$num=mysql_numrows($result);
echo "<tr><td colspan=4>There were <b>$num</b> results found.</td></tr>";
$i=0;
while ($i < $num) {
$manf=mysql_result($result,$i,"Manf");
$mdlnum=mysql_result($result,$i,"MdlNum");
echo "<tr><td>$manf</td><td>$mdlnum</td></tr>";
$i++;
Can anyone sort this out?
r/s
Learner