Welcome Guest, Not a member yet? Register   Sign In
Joining 3 tables together
#1

[eluser]xerosis[/eluser]
I have three tables:
1. keywords
2. pricelist
3. pricelist_keyword

Basically the pricelist_keyword is where we assign:
- id
- pricelist_id
- keyword_id
- text_price
- image_price

How can I write a query without making it like this: `tablename`.`field` but get the following:

- pricelist_id
- title (from keyword)
- keyword_id
- text_price
- image_price

I know I can write a long query but the issue is that in my config (DB config) file I have given my database fields a dbprefix of adp_ so if need to write this code in a way that I have to assign the table adp_keyword or adp_pricelist it kind of ruins the purpose.

What must I do?

Thanks.
#2

[eluser]xerosis[/eluser]
what?




Theme © iAndrew 2016 - Forum software by © MyBB