Page is a not externally linkable
- Code, Content, and Presentation
-- Databases
---- Combing multiple statements


ahmed24 - 1:57 am on Dec 30, 2012 (gmt 0)


I think i've figured out how to join the 3rd result using the same logic. it seems to be working, i've copied and pasted it below, can anyone kindly confirm if i've got the logic correct?



SELECT ur.user_id, uc.contact_id, c.email, c.phone, c.mobile
FROM user_reg ur

INNER JOIN user_contacts uc ON ur.user_id=uc.user_id
INNER JOIN contacts c ON uc.contact_id=c.id

WHERE ur.year='2012' AND ur.end_date IS NULL


Thread source:: http://www.webmasterworld.com/databases_sql_mysql/4531887.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com