i have 2 tables one market, another brand , so when a client search for a brand i need to return all the markets where he can find that brand.
views:
27answers:
1
A:
assuming your dd looks like this:
market(id, name)
brand(id, name)
market_brand(fk_market_id, fk_brand_id)
your query would look something like this:
select m.name
from brand b
join market_brand mb on mb.fk_brand_id = b.id
join market m on m.id = mb.fk_market_id
where b.name = 'your_brand'
Dennis Haarbrink
2010-07-15 10:34:10
thanks you've been very helpfull
decebal
2010-07-15 11:10:03
@user392502: Absolutely. Can't help you with that though, don't know any python. You should ask another question to get that answered :)
Dennis Haarbrink
2010-07-16 11:29:31