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

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

Well, there are actually two options tables but I only use one in this query. The first options table holds options for all the products on the site. The second options table ORDER_OPTIONS only contains the options selected by customers that placed orders. So the answer to you question is yes, technically.

ORDER_OPTIONS.OItemID=ORDER_ITEMS.ItemID matches the correct option to its item. In the case of an item that has multiple options, they will all share the same ID number. So I'll get several rows of the same sku, description, etc that are all for the same item, just different options in the last 2 columns (option name and option value).

I was thinking that perhaps an if/else in a do/while loop with PHP might help me in this situation. (if there are multiple instances of xID then write the table this way, else write it this way...)I've written plenty of these in VBA but have not attempted one in PHP yet...if it's even the right direction to go.

DaK
Reply With Quote