Hi,
i cann't figure it out how to do this.
i have 1 table (art) with info about products
id, main_group_id, group_id,sub_group_id,name,description,price
and 1 table (xtra_art) that has only
id,art_id,main_group_id, group_id,sub_group_id
art_id is the id from the table art.
Now this is what i want.
I want to select everything from both tables where the main_group_id is let say 156. That's not the trick, but when there is a match in xtra_art it has to put the name, description and price from the table art to the corresponding row. So if art_id from xtra_art equals id from art put the data together.
I don't know if you get it, but here is a small example.
table: art
id, main_group_id, group_id,sub_group_id,name,description,price
1 , 156, 23, 5 , hat,nice hat,9.95
2, 155,22,7,pants,blue pants,15.95
table xtra_art
1,1,155,22,7
know i want to select all things from both table with main_group_id equals 155, and put the info to the rows.
This is the output i want:
2, 155,22,7,pants,blue pants,15.95
1 , 155, 22, 7 , hat,nice hat,9.95
where hat,nicehat,9.95 is the info from table art
Thanks in advance,
Jeroen.