[求助]用户登录出错
写了一个登录代码,如下:SqlConnection con = db.createcon();
con.Open();
SqlCommand cmd = new SqlCommand("select count(*) from [user] where userName='" + this.txtName.Text + "'&pwd='" + this.txtDlPwd.Text + "'", con);
int count = Convert.ToInt32(cmd.ExecuteScalar());
if (count > 0)
{
this.Label2.Text = this.txtName.Text + "你已经成功登录,欢迎您光临本站!";
}
else
{
this.Label2.Text = "您不是本站会员,请注册后再登录!";
}
运行提示int count = Convert.ToInt32(cmd.ExecuteScalar());处“=”附近有语法错误。那位知道怎么写??/