nikomou
07-15-2008, 03:05 PM
Hello, i have this script below to show mobile phones available on a network. is it possible to group the handsets by Make adding the manufacturers name before the products?? e.g.
Nokia Mobile phones
n80, n95, etc
Sony Ericson Mobile Phones
w800i, w850i, etc
Thanks
$conn = mysql_connect($address, $username, $password);
$rs = mysql_select_db($db, $conn);
$sql="SELECT * FROM Offers WHERE NetworkName='$GetNet' GROUP BY ModelName ORDER BY ModelCreated DESC";
$rs = mysql_query($sql, $conn);
$j = 0;
echo("<table><tr>");
while($row = mysql_fetch_array($rs)) {
$ID = $row[xx];
$Make = $row[xxx];
echo("<td width='137'><p align='center'><b>");
echo("<br><a class=\"menusmall\" href=\"xxx.html\"><img alt=\"$Make $Name\" src=\"xxx\" border=\"0\"></a><br><br>");
echo("</td>");
$j++;
if(($j % 4) == 0) echo("</tr>\n<tr>");
}
echo("</tr></table>");
mysql_close();
?>
Nokia Mobile phones
n80, n95, etc
Sony Ericson Mobile Phones
w800i, w850i, etc
Thanks
$conn = mysql_connect($address, $username, $password);
$rs = mysql_select_db($db, $conn);
$sql="SELECT * FROM Offers WHERE NetworkName='$GetNet' GROUP BY ModelName ORDER BY ModelCreated DESC";
$rs = mysql_query($sql, $conn);
$j = 0;
echo("<table><tr>");
while($row = mysql_fetch_array($rs)) {
$ID = $row[xx];
$Make = $row[xxx];
echo("<td width='137'><p align='center'><b>");
echo("<br><a class=\"menusmall\" href=\"xxx.html\"><img alt=\"$Make $Name\" src=\"xxx\" border=\"0\"></a><br><br>");
echo("</td>");
$j++;
if(($j % 4) == 0) echo("</tr>\n<tr>");
}
echo("</tr></table>");
mysql_close();
?>