MySQL JOIN with IF conditions.

Posted by user333187 on Stack Overflow See other posts from Stack Overflow or by user333187
Published on 2010-05-05T07:56:08Z Indexed on 2010/05/05 7:58 UTC
Read the original article Hit count: 210

Filed under:
|
|
|

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?

© Stack Overflow or respective owner

Related posts about mysql

Related posts about join