I am trying to retrieve a value from a SQLite Database. My query works fine when I use the following:
String selectQuery = "SELECT * FROM savedlocation WHERE latitude="+lat;
But It doesn't work when I use the following query:
String selectQuery = "SELECT * FROM savedlocation WHERE latitude="+lat+"AND longitude="+lon;
Can anyone tell me what is wrong with this query?
Missing space before AND
:
String selectQuery = "SELECT * FROM savedlocation WHERE latitude="+lat+" AND longitude="+lon;
// ^ here
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.