I have the following DB helper class:
public int studentExists(String studid) {
Cursor dataCount = mDb.rawQuery(\"select count(*) from usertable where \"
I think you got the answer to what's wrong from Antlersoft or p.campbell, to format the query correctly, I would suggest, you do it like this :
mDb.rawQuery("select count(*) from usertable where " + KEY_STUDID + "=?", studid);
That should (1) solve your problem and (2) protect you from SQL injections
Also, I am not sure that
dataCount.getInt(0);
is the best thing to do... you should probably use getColumnIndex to make sure you are getting the right data...