I am inserting a string value into my mysql db which had apostrophe with no problem because I do this when inserting.
String cleanMessage = oriMessage.replace("'","\\\'");
The problem when I try to read from the same table I tried like this
level2 = level2.replace("'","\\\'"); String queryCheck = "Select dataID from tblData where dataString='"+level2+"'";
What I notice in between the data where I try to read have like this \' ? So how to solve this problem?