Hey all.
My background is as a php developer. I Learnt Java in college but that was all of 10 years ago and I have gotten a tad rusty since then,
Im trying to get my head around android and I have been doing ok until now... but.....
I am trying to execute an sql query to the sqlite database,
in PHP no problem, $sql = "select from table where `username` = '$username' and `password` = '$password'
however I am stumped trying to achieve this android.
what I have is:
Cursor cur = db.query("escar_users", null, orgWhere, null, null, null, null);
but its the where clause that has gotten me stuck
my string orgWhere = "username = "+sUserName+" AND password = "+sPassWord
where sUsername and sPassWord are input variables captured from a login screen., but it crashes every time.
please. am I doing something obviously wrong here?
Thanks in advance, beedge.
My background is as a php developer. I Learnt Java in college but that was all of 10 years ago and I have gotten a tad rusty since then,
Im trying to get my head around android and I have been doing ok until now... but.....
I am trying to execute an sql query to the sqlite database,
in PHP no problem, $sql = "select from table where `username` = '$username' and `password` = '$password'
however I am stumped trying to achieve this android.
what I have is:
Cursor cur = db.query("escar_users", null, orgWhere, null, null, null, null);
but its the where clause that has gotten me stuck
my string orgWhere = "username = "+sUserName+" AND password = "+sPassWord
where sUsername and sPassWord are input variables captured from a login screen., but it crashes every time.
please. am I doing something obviously wrong here?
Thanks in advance, beedge.