i want to select a single record using from two tables. But if you use SIMPLE JOIN, it will only returns the value when the condition satisfies both the table and when we use LEFT or RIGHT JOIN also, it will return all the values from the LEFT or RIGHT table.
I’m using the following query,
SELECT *
FROM activity_feeds
LEFT OUTER JOIN activity_traders ON activity_feeds.feed_id = activity_traders.trdr_feed_id = '11'
I need to get the values from both tables only when activity_feeds.feed_id = activity_traders.trdr_feed_id = '11' and when the value does not matches with the right table, it should return null for the columns in the right table. Please help!
Edit:Table structures added
Feeds

Traders

I assume that all the records are based from
activity_feedswhether or not thefeed_idexists onactivity_traderstable as long as it will display allfeed_idthat has a value of11. Try this one.