我收到了错误:
在非对象
上调用成员函数bind_param()
在下面的代码中,我不知道出了什么问题,一切似乎都适合我。
//Group controls by a group identifier in this case the string 'name'`
txtForename.name = "name";
txtSurname.name = "name";
txtNotAName.name = "notAName";
foreach (Control control in form.Controls)
{
if (control.Name == "name")
{
Console.WriteLine("true");
}
}
答案 0 :(得分:0)
$ db未设置为mysqli类对象的实例。这种情况最常发生在连接语句出现故障时。请参阅mysqli manual page以获取正确的语法并帮助调试错误
答案 1 :(得分:0)
尝试这一个它正在运作
$stmt = $conn->prepare("INSERT INTO list (title, topicDesc, date,kod,country)
VALUES (:title1, :topicDesc1, :date1, :kod1,:country1)");
$stmt->execute(array(
':title1' => 'col2',
':topicDesc1' => 'col3',
':date1' => 'col4',
':kod1' => 'col4',
':country1' => 'col4'));