vendredi 6 février 2015

Whats wrong with the following sqlite statement in android

What is wrong with the following code? I get the following error


unrecognized token: "12345" (code 1): , while compiling: SELECT id, flag FROM myTable WHERE snumber=12345



String number = "12345";
public static final String SNUMBER = "snumber";
public static final String ID = "id";
public static final String FLAG = "flag";

String[] thecolumns = new String[] { ID, FLAG };

Cursor cursor = sqlDb.query(TABLE_NAME , thecolumns, SNUMBER+ "=" + number, null, null, null, null);

Aucun commentaire:

Enregistrer un commentaire