[eluser]Unknown[/eluser]
Hi all,
I am new to CodeIgniter. I recently experienced a 1054 Database error when using using form_remote_tag to submit a form. It tells me there is a unknown column '_'.
The steps to reproduce this error are as follows:
Step 1: Build a function which includes $this->db->insert('sitereview', $_POST) within controller.
Step 2: In view file, establish form by using following code:
echo $this->ajax->form_remote_tag(array('url'=>'/review/review_insert', 'loading'=>"Element.show('indicator')", 'complete'=>"Element.hide('indicator')",'update'=>'reviewSubmitForm'));
echo form_hidden('siteID',$this->uri->segment(3));
echo form_hidden('dateAdded',mdate($datestring, $time));
echo form_hidden('authorID',1);
Step 3: I review all my form and am very sure there is no input field which I name after '_'
Step 4: Once I submit a from, I got error message
A Database Error Occurred
Error Number: 1054
Unknown column '_' in 'field list'
INSERT INTO `sitereview` (`siteID`, `dateAdded`, `authorID`, `reviewDetails`, `siteRating`, `_`) VALUES ('2', '2008-08-09 04:46:01', '1', 'sdf', '0', '')
Expected behavior:
I expect the form should go through.
Actual behavior:
The page throw an error and I have no idea where `_` comes from.
Note:
Systems I am using. PHP5. Apache 2.2. IE 7 and Firefox 2.0.0.16
Any help will be very much appreciated.
Kevin