I have these two tables setup and the below query running. The problem is I need to be able to output both columns called store at the same time if I can from the same query. Also at the moment if I try to output the column id it outputs the column id from the users table and not the retail table as I would like.
I believe there is a way to do this, but if I am incorrect please do tell me, otherwise I will be knocking my head against a brick wall for much longer.
Cheers for any help.
Table users
id
store (this is the name of the store)
Table retail
id
store (this refers to the id in the users field)
$query ="SELECT * FROM retail JOIN users ON users.id=retail.store";
user_idinstead of juststorein the retail-table.store_idwould also work, but since (if I understand it correctly), the stores are in theuserstable,user_idwould be more consistent