我正在尝试使用php中的for循环向表中添加列,其中每个列名都是一个数组中的值。$column[$i]." int(3) DEFAULT 0");它适用于所有的列名,但是当涉及到列名' for‘时,我得到了这个错误。You have an error in your SQL syntax; check the manual that corresponds to your MySQL server versionfor the right syntax near
原来"Group“是一个注册的mysql术语,所以我将"Group”改为Web_Group。嘿嘿。这让我整晚都很沮丧。谢谢这么多的堆叠溢出用户!我一直试图写到mysql中的一个专栏,它是"Group“,但它不起作用。$query = mysql_query("INSERT INTO users SET username='$username',password='$pass',mcname='$mcname',GroupMySQL</