I am using phonegap for my mobile application . I need to generate queries dynamically and then execute the query;
qry += "('" + item1 + "','" + id + "','" + item2 + "','" + item3 + "'),";
item1,item2,item3 should be strings so that query happens successfully while executing.
the above bit of is fine for my use case in most of the cases . But i got an unexpected error now .
If the value from item1 is as 1'Feet
or 10 ' Feet
code breaks and execution fails .
How can i overcome this ?