Mysqli错误:列计数与第1行的值计数不匹配
问题描述:
下面是正在执行的mysqli查询,任何人都知道我得到了这样的错误:
Below is the mysqli query that is being performed, anyone know what I get such error:
$sql = mysqli_query($db, "INSERT INTO `tbl_bugzilla`
(`id`, `by`, `title`, `content`, `date`, `application`,`priority`, `assigned`, `status`)
VALUES (NULL, '".$_SESSION['exp_user']['username']."', '"
.$_SESSION['exp_user']['username']."', '".$title."', '".$content."','"
.$dt."', '".$_POST['app']."', '".$_POST['priority']."', 'Unassigned', 'Unconfirmed')");
错误: 列数与第1行的值计数不符
更重要的是,您能解释一下错误,这样我就不会再犯同样的错误了吗?
More importantly, could you explain the error so I don't make the same mistake again?
谢谢
答
该死的东西:
我在查询中两次提到'".$_SESSION['exp_user']['username']."',
,导致10列,而不是9列.
I mentioned '".$_SESSION['exp_user']['username']."',
twice in the query, leading to 10 columns, not 9.
对不起,人们:(