I need to run a SQL query(SQLite Database) in my android application. Query is as follows.
public Cursor getLongitudeLatitude(String port)
{
Cursor cur = null;
String qry = "SELECT latitude, longitude FROM port WHERE name='"+port+"'";
SQLiteDatabase db = this.getReadableDatabase();
cur = db.rawQuery(qry,new String [] {});
return cur;
}
The original values that should return from this query contains single and double Quotes. for ex: 36°7’59”N
But it actually retuns 36°7. How can I query to get the entire value.
Thank you
I think the problem is not at calling the value, I think you had an error when writing it to the database. You should check if it’s correctly in your DB (use Firefox SQL manager or something).
How did you write it to your DB?