Page is a not externally linkable
- Code, Content, and Presentation
-- Databases
---- MySQL Join Left Not Working


compubasic - 4:13 pm on Sep 15, 2010 (gmt 0)


My apologies, that query wasn't working....

This query does return results, but it's still dropping the result rows where the joblogOfficeID=0. Here is the current query I have which returns (not all) results

SELECT joblog.joblogJobID, joblog.joblogPerformedOn, joblog.joblogWorkDescription, joblog.joblogTime, joblog.joblogTravelCost, joblog.joblogLaborCost, joblog.joblogJobTotal, joblog.joblogOfficeID, billingclasses.billingclassesType, users.userName, clientlocations.clientlocationsOffice FROM joblog, billingclasses, users LEFT JOIN clientlocations ON clientlocations.clientlocationsOfficeID WHERE joblog.joblogClientID=5 AND clientlocations.clientlocationsOfficeID=joblog.joblogOfficeID AND billingclasses.billingclassesID=joblog.joblogBillingClass AND users.userID=joblog.joblogEngineerID


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