Since the below select query blew up on me, then I must be doing something wrong, 
perhaps it is because I am using the wrong type of join, dunno
I would like to join the same table twice, with different criteria as below

Anyone got a solution to this?

SELECT EVENTATTENDANCE.ID, 
        CONCAT(IF(SALUTATION.Name IS NOT NULL,CONCAT(SALUTATION.Name,' 
'),''),IF(FirstName IS NOT NULL, FirstName, ''),' ', IF(LastName IS NO
T NULL, LastName, '')) AS 'Contact' ,
        ORGANIZATION.Name AS 'Organization', 
        RELATIONSHIP.Name AS 'Relationship', 
        STATUS.Description AS 'Status' 
FROM EVENTATTENDANCE 
LEFT JOIN EVENT ON EVENTATTENDANCE.ID_EVENT = EVENT.ID 
LEFT JOIN CONTACT ON EVENTATTENDANCE.ID_CONTACT = CONTACT.ID 
LEFT JOIN STATUS ON EVENTATTENDANCE.ID_STATUS = STATUS.ID 
LEFT JOIN ORGANIZATION ON CONTACT.ID_ORGANIZATION = ORGANIZATION.ID 
LEFT JOIN TYPE RELATIONSHIP ON CONTACT.ID_TYPE_RELATIONSHIP = TYPE.ID 
LEFT JOIN TYPE SALUTATION ON CONTACT.ID_TYPE_SALUTATION = TYPE.ID 
WHERE EVENTATTENDANCE.ID_EVENT = -1 
ORDER BY CONTACT.FirstName
SQL Error in populateDataSet
==============================
Please Restart The Application
==============================
SQLException: General error: Unknown table 'TYPE' in on clause

Luc Foisy 


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to