mysql更新查询不工作。表数据没有更改。我使用mysql和c。我的表字段是:
username,
password,
name,
Loggedin
代码:
try
{
string userlogout = "UPDATE UsersTable SET Loggedin = '0' WHERE username = '" + txtlogoutusername.Text+ "' ";
obj.cmd.Connection = obj.conn;
obj.cmd.CommandText = userlogout;
obj.cmd.ExecuteNonQuery();
userpanel.Visible = false;
}
catch (Exception ex)
{
MessageBox.Show("" + ex);
}
1条答案
按热度按时间zbdgwd5y1#
app.config上的连接字符串
检查select语句