How to get full message to seek data from mysql

I want to match the query from mysql but I do not know how to get the message user input