[C#] Restart Problem
#21

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.

#22

2

 

Its working Wink

Now try make a listview :p

PS : Anyone know how to Save a Connection?



Forum Jump:


Users browsing this thread: 1 Guest(s)