我一直在看这段代码一段时间,我看不出问题出在哪里。我一直在阅读整个 StackOverflow,但仍然看不到我的错误在哪里。
<?php
mysqli_connect("localhost","root","","web_table");
mysql_select_db("web_table") or die(mysql_error());
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
echo "<p> Connection Successful!"
mysqli_query('INSERT INTO web_formitem (ID, formID, caption, key, sortorder, type, enabled, mandatory, data) VALUES (105, 7, Tip izdelka (6), producttype_6, 42, 5, 1, 0, 0)');
echo "<p>Insert successfull";
?>
错误在第 13 行某处,即mysqli_query('insert...
. 我试图通过http://www.w3schools.com/php/php_mysql_insert.asp来帮助自己,但这对我帮助不大。