![]() |
|
[C#] Restart Problem - Printable Version +- LCKB (https://lckb.dev/forum) +-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109) +--- Forum: Programmers Gateway (https://lckb.dev/forum/forumdisplay.php?fid=196) +---- Forum: Coders Talk (https://lckb.dev/forum/forumdisplay.php?fid=192) +---- Thread: [C#] Restart Problem (/showthread.php?tid=779) |
- someone - 05-05-2012 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. - Nikolee - 05-06-2012 2 Its working ![]() Now try make a listview :p PS : Anyone know how to Save a Connection? |