I have a real estate idx database with 3 tables res, seo, fagents.
fagents is a table containing info on agents from my company and no other company. I'm trying to populate a property detail page and if the property is listed by my company, I want to show additional details about the agent (from the fagents table)
Here is my query:
SELECT * FROM res,seo,fagents WHERE res.listID = "#URL.listID#" AND res.listID = seo.listID AND res.agentID = fagents.agentID
The problem with this query is that if the property is listed by another company then res.agentID = fagents.agentID wont find a match and the property will not be shown.
How can I make this work? Any help appreciated!