Paul,
Thanks for replying so quickly. I tried implimenting this and got it to work somewhat. The problem I am having is that it only grabs one product in the database where there are six. It also queries for 9 spaces with something in each space, but I am assuming that it probably will try to put something in an empty space if the query doesn't come out even?
Here is what I did, maybe you can look to see what maybe I did wrong? Thanks for your help.
There was one line:
$fun = mysql_fetch_object($result);
I couldn't figure out what this would be referencing? Maybe this is the problem?
Brett
<?
$db_name = "madewithcare_ws";
$table_A = "Baskets";
$connection = @mysql_connect("localhost", "crafts", "8kksDR4t") or die("Couldn't connect");
$db = @mysql_select_db($db_name, $connection) or die("couldn't select database");
$sql = "SELECT BasketID,
BasketName,
BasketPrice,
BasketImageThumbnail
FROM $table_A
ORDER BY BasketName
";
$result = @($sql);
while ($row = mysql_fetch_array($result)) {
$BasketID = $row['BasketID'];
$BasketName = $row['BasketName'];
$BasketPrice = $row['BasketPrice'];
$BasketImageThumbnail = $row['BasketImageThumbnail'];
}
$num=mysql_affected_rows();
$col=3;
$total=$num/$col;
for($count=1; $count<=$col; $count++) {
print("<td nowrap width=\"33%\" align=center class=\"new\">");
for($count2=0; $count2<=$total; $count2++) {
$fun = mysql_fetch_object($result);
print("<img src=\"graphics/$BasketImageThumbnail\" border=0>
<br><a href=\"basket_info.php?BasketID=$BasketID\">$BasketName</a>
<br>\$$BasketPrice
<hr size=1 width=\"90%\" color=\"silver\">");
}
print("</td>");
}
?>