MySQL JOIN with IF conditions.
- by user333187
Hi,
I want to get some results via query simillar to:
SELECT
* FROM
users LEFT JOIN
IF (users.type = '1', 'private','company') AS details ON
users.id = details.user_id WHERE
users.id = 1
Any ideas?