This problem is eating up my brain for the past few hours.
I have 2 tables:
**domain_pricing**
action enum()
map varchar(10)
cost_price varchar(10)
sale_price varchar(10)
**domain_mapping**
map varchar(10)
tld varchar(10)
map is common for both tables. sample data:
**domain_pricing**
addnewdomain,dotbiz,12,13
renewdomain,dotbiz,12,13
transferdomain,dotbiz,12,13
**domain_mapping**
dotbiz,biz
dotbiz,fizz
dotbiz,jizz
what i need after join:
biz,addnewdomain,12,13
biz,renewdomain,12,13
biz,transferdomain,12,13
fizz,addnewdomain,12,13
fizz,renewdomain,12,13
fizz,transferdomain,12,13
jizz,addnewdomain,12,13
jizz,renewdomain,12,13
jizz,transferdomain,12,13
my query:
select m.tld,p.action,p.sales_price,p.cost_price from domain_pricing as p, domain_mapping as m where p.map=m.map
result: biz,addnewdomain,12,13 biz,renewdomain,12,13 biz,transferdomain,12,13 dats all, tried doing left join but that gave all values for biz then fizz,null,null and finally jizz,null,null
Can't figure out where i'm going wrong