Hello i am getting an error on a CASE WHEN THEN syntax on my mySql
SELECT DISTINCT u.uid,c.c_id,u.name,u.profile_pic,u.username,u.email,c.time
FROM conversation c, users u, conversation_reply r
CASE
WHEN c.user_one = '99'
THEN c.user_two = u.uid
WHEN c.user_two = '99'
THEN c.user_one= u.uid
END
AND (
c.user_one ='99'
OR c.user_two ='99'
) AND u.status='1' AND c.c_id=r.c_id_fk AND u.uid<>'1'ORDER BY c.time DESC LIMIT 15
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CASE
WHEN c.user_one = '99'
THEN c.user_two = u.uid
WHEN c.user_t' at line 3