<?php
include("config.php");
include("opendb.php");
$get_cats = mysql_query("SELECT * FROM `categories` ORDER BY `displayorder`") or die(mysql_error());
$get_info = mysql_query("SELECT * FROM `systeminfo`") or die(mysql_error());
$info = mysql_fetch_array($get_info);
while($cats = mysql_fetch_array($get_cats)) {
$get_rares = mysql_query("SELECT * FROM `rares` WHERE `catid`='".$cats['id']."'") or die(mysql_error());
echo("<b><center><font face=verdana size=1> ".$cats['name']."</font></center></b><br>
<table width=\"466\" border=\"0\">
");
$color1 = $info[stripe1];
$color2 = $info[stripe2];
$row_count = 0;
while($rare = mysql_fetch_array($get_rares)) {
$row_color = ($row_count % 2) ? $color1 : $color2;
?>
<td>
<td width="15%" style="text-align:center;background-color:#<?php echo $row_color; ?>"><font face=verdana size=1><?php echo $rare['name']; ?></font><br><font face=verdana size=1><img alt="" src="<?php echo("".$info[imagepath]."".$rare['image'].""); ?>"><br><?php echo $rare['value']; ?> HC</font></td>
</td>
<?php
$row_count++;
if($row_count==6){
echo '</tr><tr>'; //close and open a row if $row_count=;6
$row_count=0;
}
}
echo("</table><br>
");
}
?>
Is there anyway to make the rares be grabbed in order of there value?





Reply With Quote


