MySQL query with exchange of reference to IDs
Posted: Thu Jun 07, 2012 7:26 am
Hi everyone,
I'm new to this board, and registered to try to solve an issue I have with some SQL queries. I have a database, that has one table for users, one table for shops and another table for services.
When listing the services table, who has references to both the shops and the user table (to their IDs).. I wish to exchange or add fields from the shops and user database. Lets say that my service table looks like this:
Hope that someone understand my question, and are able to help me.
I'm new to this board, and registered to try to solve an issue I have with some SQL queries. I have a database, that has one table for users, one table for shops and another table for services.
When listing the services table, who has references to both the shops and the user table (to their IDs).. I wish to exchange or add fields from the shops and user database. Lets say that my service table looks like this:
I wish for every line it reads from the servicetable, it adds two fields or exchanges creator and shopid with name from the user and the shop table. I guess its possible with the SQL query, but how ?id | creator | shopid | comment
Hope that someone understand my question, and are able to help me.