dimanche 26 avril 2015

Android sqlite Where clause returning one row column with id

I want to get a single column of a row with an id , shall I do

 String selQ = "SELECT " + name + " FROM " + table+ " WHERE " + id+ " = '" + id + "'";

or

 String selQ = "SELECT * FROM " + table + " WHERE " + id+ " = '" + id + "'";

Shall I get a cursor?

Aucun commentaire:

Enregistrer un commentaire