android - SELECT WHERE sql query -


i'm trying match username , password in existing database , i'm stuck @ point in writing sql query.

cursor cursor = db.rawquery("select " + dbh.name + dbh.pass + " tablename where" +dbh.name +"="+ e1.gettext().tostring()+";", null); 

you can using follows highly discouraged:

string selectquery = "select * "+ table_name +" "+column_username + " = '"+usrname+"' , "+column_passwd+" = '"+passwd+"' ";  //column_username column name stores username column_passwd column storing password cursor cursor = database.rawquery(selectquery, null); 

you can try use accountmanager class purpose. there questions deal how store username , passwords. should checkout following threads:

1) android: storing username , password?

2) is safe store username + passwords in local sqlite db in android?

hope helps.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -