我需要帮助设置/更改我的C#程序中的标签的值,每当我尝试它时发生错误,说我需要交叉线程.任何人都可以编写一些代码来帮助我吗?我的代码是:
int number = 0;
int repeats = Convert.ToInt32(textBox2.Text);
while (number < repeats)
{
repeats++;
label5.Text = "Requested" + repeats + "Times";
}
Run Code Online (Sandbox Code Playgroud)
谁能帮我?谢谢.
我一直在互联网上寻找以下错误的解决方案;
"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'primary, username, password, password2) VALUES (null, 'hello', 'hello', 'hello')' at line 1"
Run Code Online (Sandbox Code Playgroud)
我不知道发生了什么......我知道你会问我的代码是什么:
$con = mysql_connect("localhost","root","*****");
if (!$con)
{
die('Server overload, please try again' . mysql_error());
}
mysql_select_db("users", $con);
$sql = "INSERT INTO details (primary, username, password, password2) VALUES (null, '$_POST[username]', '$_POST[password]', '$_POST[password2]')";
if (!mysql_query($sql,$con))
{
die('Error: Server overload, try again' . mysql_error());
} …Run Code Online (Sandbox Code Playgroud)