Hi all i am a bit puzzled with trying to display my output data how i would like in a table.
It is perfectly fine listing it as a single column all the way down the page, however i would like to be able to display 3 columns of data per row, eg:
Record 1 Record2 Record3
Record 4 Record5 Record6
My code for single column is:
$sql2="SELECT DISTINCT Make,Model FROM parts_list WHERE Make LIKE '%$make%' AND Model LIKE '%$model%'";
$result2=mysql_query($sql2) or die ("Broken!!!!!!");
while ($rs2 = mysql_fetch_array($result2)){
$FoundMake = $rs2['Make'];
$FoundModel = $rs2['Model'];
$sql3="SELECT count(Make) as part_count FROM parts_list WHERE Make = '$FoundMake' AND Model = '$FoundModel'";
$result3=mysql_query($sql3) or die ("MySQL Query failed");
while ($rs3 = mysql_fetch_array($result3)){
$partcount = $rs3['part_count'];
}
print "<tr>";
print "<td class='cellequal1'><a href=Viewproducts.php?Make=$FoundMake&Model=$FoundModel>$FoundMake - $FoundModel - $partcount listed products</a></td>";
print "</tr>";
}
However i cant see how i could make this print 3 columns and then loop to do another 3 on the next row, Is there a way i can skip to next record in the array without continuing the loop?
Any help would be greatly apreciated.
Many thanks and kind regards
Kestral