I want to select some data from the sqllite Db. Now I face a problem.
I have give a raw query as follows:
String MY_QUERY0 = "select * from logs where log_name=\""+log_name.replace("'","\'")+"\"";
this can help me to avoid the application from being crashing when a data like
Names’s
is pulled from the Db.
But now I have to solve the same case with double quotes. data like
“Data”
can any one help..
Thanks in advance.
You can make use of the rawQuery:
This not only solves your quotes problem but its also much more secure because it prevents SQL Injection.