string name; name = cbxnames.SelectedValue.ToString(); myConnection.GetConnection(); MySqlCommand cmd = new MySqlCommand("SELECT * FROM users WHERE name= '+name+'", myConnection.GetConnection());
"SELECT * FROM users WHERE name = 'randomname'"
MySqlCommand cmd = new MySqlCommand("SELECT * FROM users WHERE name ='" +name+"'",myConnection.GetConnection());
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)