I need some help writing a mysql query that joins data from 4 different tables.
This is what I currently have (where I'm retrieving and linking data from 2 different tables using "LEFT JOIN"):
LEFT JOIN users
ON seo_clientrequests.client_id = users.id
WHERE users.status = '1'
How would I update this query so that it also retrieves data from a 3rd table named "seo_projects" ?
Here are the columns that are in my seo_projects table:
The LEFT JOIN statement for this would be pretty much identical to the one I'm already using, though I can't seem to figure out how to update the query with a 2nd LEFT JOIN statement, .. or if that's even the correct approach:
LEFT JOIN users ON seo_projects.client_id = users.id
The goal would be for me to retrieve a DISTINCT listing of rows for both the "seo_clientrequests" & "seo_projects" tables (ie: if there are 5 rows in the seo_client requests table and 4 rows in the seo_projects table .. my query should return 10 rows), and to link both of them to the "users" table (so I can retrieve the companyname, usertype, and whitelabel_company_id values).