==================== Problem Description ====================
Implement the user login function, get the user's name (username) and password (password) in the mobile client, and then query the user on the server side, how should the query statement be written? That's what I wrote;
Create a link to the database, query the user jdbconnection sqlconn = new Jdbconnection (); Sqlconn.executequery ("Select Name,password from User_test WHERE name = ' "+ username +" ', "+" password = ' "+ Password +" ' ");
Then error you with an error in your SQL syntax;
Is punctuation wrong, which seniors can help solve under, novice grateful
==================== Solution 1====================
Replace "," with "and" to try
Select Name,password from user_test where name= ' xxx ' and password= ' xxx '
==================== Solution 2====================
Conditions with and
Android Server Query database operation