I have been getting data out of my DB with no problems but now I wanted to try to display the data a bit differently and I am hitting a roadblock.
example of data in DB. 2 fields, company and item
company item
acme widget1
acme widget2
acme widget3
Comp2 item1
Comp2 item2
Comp2 item3
how can I get my data to display 1 instance of the company name and then every item that belongs to that company instead of the company name getting displayed for each item in the db?
I am using a printf statement like this for my current search:
$query = select manufacturer,item from table order by manufacturer
$result = mysql_query($query)
while ($myrow = mysql_fetch_row($result)) {
printf("<tr><td>%s</td><td>%s</td></tr>\n",
$myrow[0], $myrow[1]);
}
Any ideas for me? Can it be done without too much fuss?
As always, Thanks guys!