tags:

views:

397

answers:

1

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')");

Error: Column count doesn't match value count at row 1

More importantly, could you explain the error so I don't make the same mistake again?

Thanks

+1  A: 

Got the damned thing:

I mentioned '".$_SESSION['exp_user']['username']."', twice in the query, leading to 10 columns, not 9.

Sorry folks :(

Shamil