So I completely misunderstood this code and its not processing the search value as the participant, but only for the condition after the “AND”. So please ignore my previous comments. The ID I was searching was the ID of the user I was logged in as….doh. Now I’m left with the question, not the BUG of how does one search for messages either to or from a user.
On further inspection, I think the issue is with the ….AND (((wp_fep_messages.mgs_title LIKE …….I think that AND should be an OR.
No help from anyone….closing.