Hey guys,
I need help with mysql statement. I have 3 tables: new_orders, client_info, admin_notes.
I'm trying to join all three tables together but having admin_notes as an optional result - meaning it may or may not be there.
To join first two tables I used INNER JOIN, like this:
SELECT * FROM new_orders INNER JOIN client_info ON new_orders.client_id = client_info.client_id
Now, I need to attached admin_notes to this result set but only some orders have notes and other's don't. I noticed you can't combine INNER JOIN with LEFT JOIN in one statement
I tried doing:
SELECT * FROM new_orders INNER JOIN client_info ON client_info.client_id = new_orders.client_id, new_orders LEFT JOIN admin_notes ON new_orders.order_id = admin_notes.order_id
But this return an error saying new_orders is not unique table/alias.
Any ideas how to accomplish this??
Thanks in advance.