I have a table called result, this table has a column called product. Furthermore theres a table JOINing the result-table in this example called extra_result. What I like to do is as follows:
product from result is going to have add ons i a HTML presentation. What I need to do is adding extra to products. the index to add on1, add on2
HTML presentation
client | product + add_on1 + add_on2 etc | etc
The tables in the data bas is:
result
ID | client | product_id | etc
product
product_id | product
result_extra
extra_ID | extra_id if theres a match extra_ID with result.ID extra is to be fetched.
extra
extra_id | extra
Is it possible to do this with mysql or do I have to muster some phpcode to do it. If it's possible, how would that query look?