jeudi 12 mars 2015

Why does this SQL-Statement lead to an error?



I am getting quite angry with this, so I seek help from the crowd ;)


What I want to do: We have a Unity learning game which shall implement a login window. The entered credentials are then hashed (the pw is) and sent to the server, who then should check this against a database.


I have the following table:


xy.users_confirms with the following colums:


id username email password hashcode created


Why does my code



String sql = "SELECT " + "xy.users_confirms.password as pwhash, "
+"FROM xy.users_confirms " +"WHERE xy.users_confirms.username = " +"\"userNameToGetHashFor\"";


lead me to the SQLException "Parameter index out of range (1 > number of parameters, which is 0)"


?


Thanks, any input is much appreciated!




Aucun commentaire:

Enregistrer un commentaire