If m.message_type_id IN () is empty it is giving me an error which says
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ) UNION ( ' at line 16
SELECT m.id,m.log,message,images,videos,uo.user_id as to_id,owner_id,
IF(m.owner_id = 45,'sent','received') as type
FROM messages as m
LEFT JOIN events as e ON m.message_type_id = e.id
LEFT JOIN user_organization as uo ON uo.id = e.org_id
WHERE m.message_type_id IN ()
AND m.type = 'event_invite_request_msg'
and if WHERE m.message_type_id IN (61) it gives me the correct response.
What is the solution?