View Single Post
  #1 (permalink)  
Old 07-27-2007, 01:37 PM
dak888 dak888 is offline
WebProWorld Member
 

Join Date: Nov 2006
Posts: 72
dak888 RepRank 0
Default Which one? PHP or MySQL

I'm pretty new to this but I'll try to explain my situation and what I'm trying to accomplish.

The scenerio:
I've built a query that will return customer order information including name, address, products ordered, etc.... Works great and returns the results I want.

The problem: If a product has multiple options (ie. color, size, etc...) my query returns a new row for each item option which could create a lot of confusion for the eventual end user which is not the desired result. I need a way for either MySQL or PHP (on the output page) to recognize that multiple options belong to one item and to display them on the same row.

Now each item option can be associated to the item through a unique itemID/optionID but I just can't figure out how to make them display on one row.

Is this something I can accomplish with MySQL or do I need to somehow format it with PHP when it's output on the page?

Any direction as to the best approach would be appreciated.

Thanks,

DaK
Reply With Quote