PHP Code:
$getcat = $DB_site->query("SELECT * FROM auction_item ORDER BY 'cats'");
while ($getcats = $DB_site->fetch_array($getcat)) {
$cat_id = $getcats["cat_id"];
$cats = $getcats["cats"];
eval('$auction_cat_bits = "' . fetch_template('auction_cat_bits') . '";');
}
The template $auction_cat_bits looks like this for troubleshooting.
Quote:
<td><a href="auction.php?&action=view_by_cat&cats=$cat_id "><font color="#ffffff" size="4"><b>$cats</b></font></a> XXX</td>
|
The XXX displays once where I want it to but does not repeat for each catagory. Also $cats & $cat_id are not resolving???
I have this script working but can not seem to port it to VB formatt.
PHP Code:
$sql = "(SELECT * FROM cats ORDER BY cat_name)";
$result = mysql_query($sql);
if (!$result) {
echo "<tr><td>Database Error: " .mysql_error();
echo "</td></tr>";
}
while($myrow = mysql_fetch_array($result)) {
$cat_id = $myrow["cat_id"];
$cats= $myrow["cats"];
echo "<td><a href=\"index.php?&sub_cat=$cat_id\">$cat_name</a></td>";
}
Please help