05-05-2012, 11:37 PM
Basic SQL:
Strings are quoted with single(apostrophes) or double quotes.
UPDATE `newproject_db`.`t_characters` SET `a_enable` = 0 WHERE `t_characters`.`a_Name` = Tast;
And in C# it would be something like this(quotes in strings you could write with \something\ or \" something\"):
string PlayerId = maskedTextBox1.Text;
string query = "SELECT * FROM `t_characters` a_index WHERE `a_name` = \" + PlayerId + "\;"; // And how can i Include the string PlayerID ?
Or this (C# specific for writing string literals):
string PlayerId = maskedTextBox1.Text;
string query = @"SELECT * FROM `t_characters` a_index WHERE `a_name` = " + PlayerId + ";"; // And how can i Include the string PlayerID ?
C# basic string concatenation.


