Mathias
Exalted Member
Hey i am learning to use MySQL and C# together so my first app is a login form where you can registrer and login
the registrer i did fine.. but when i got to login it was confusing. and what i get confused with is not the scripts but the SQL
if you see here
my Login DB has this two strings
accountName, accountPsw
those are the script converting the "SQL Query" to strings
but i dont know how to select
i tried something like this but it didnt want it
accUsr, accPsw are those who holds what is in the textboxes
the registrer i did fine.. but when i got to login it was confusing. and what i get confused with is not the scripts but the SQL
if you see here
my Login DB has this two strings
accountName, accountPsw
those are the script converting the "SQL Query" to strings
Code:
string accountName= reader.GetString(0);
string accountUsr= reader.GetString(1);
but i dont know how to select
i tried something like this but it didnt want it
Code:
query = "SELECT accountName, accountPsw FROM accounts WHERE accountName=''+accUsr+", accountPsw ="+accPsw+";
accUsr, accPsw are those who holds what is in the textboxes