简体   繁体   中英

Can anyone tell me why this where clause is not giving me the result?

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM