MySQL Forums
Forum List  »  Newbie

URGENT LEFT JOIN
Posted by: andi nies
Date: April 30, 2005 10:58AM

hi NG

i'm kinda familiar with left joins and so on but if some serious problems with some outer joins the last couple days and didn't find a soloution.

so herer is the thing...

i'm mapping different paymentoptions to a contract (c.o.d. or credit card e.g.) and this for each country... but when one contract choosed a option it is not avaiable for the others. so i tought RIGHT OUTER means for every option, so that atleast any option is avaiable even if its NULL, right?

Code:

SELECT * FROM countries LEFT OUTER JOIN paymentOptionToContract ON countries.cou_id = paymentOptionToContract.ptc_country RIGHT OUTER JOIN paymentOptions ON paymentOptionToContract.ptc_paymentoption = paymentOptions.pym_id WHERE paymentOptionToContract.ptc_contract = $currentContract->con_id || paymentOptionToContract.ptc_contract IS NULL ORDER BY cou_name,pym_id



so if some one could tell me WHY da heck this mysql ignors the OUTER RIGHT.

sorry for my "maybe" bad english

so thanks alto for any help!!!

andy

Options: ReplyQuote


Subject
Written By
Posted
URGENT LEFT JOIN
April 30, 2005 10:58AM
April 30, 2005 11:26AM
April 30, 2005 12:33PM
May 02, 2005 01:40AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.