Greetings Xp3rts!
Elaine n00b here again! Thanks everyone for their continued help. I have a question about displaying results ...
Using a combination of pain, tutorials, and the great help from this board I have gotten my database running. I now would like to display results of fields to the screen ...
My product database has product name, manufacturer, etc and I'd like to display the results of lets say everything from a given manufacturer on the screen. Or make some kind of menu divided up by categories. I was going to just do it by hand but isn't there a way to do this dynamically?
--- EDIT
Let me explain this better ...
I know how to display the results of the database to a page. For example, using the code below I can display all items manufactured by SmithCo ...
$sql = "SELECT * FROM products WHERE mfg='SmithCo'";
$result = @mysql_query($sql);
while ($row = mysql_fetch_array($result)) {
$mfg = $row['mfg'];
$fullproductname = $row['fullproductname'];
$id = $row['id'];
$display_block1 .= "
<a href=http://www.domain.com/products/product.php?prod_id=$id>$fullproductname</a>
<br>";
}
Then in my HTML code I have
<font size="+1"><strong>SmithCo</strong></font>
<hr noshade size="1">
<? echo "$display_block1"; ?>
... however. I have multiple manufacturers and want to display the contents on one page with each manufacturer in it's own table.
Do I have to make a query for every manufacturer? That would be tedious coding. Is there some way to do this quicker?
Elaine