Please help me
when im using the callback_insert
The date is not inserting to my database what should be the problem is this a bug?
⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠
Posted 31 July 2013 - 02:55 AM
Please help me
when im using the callback_insert
The date is not inserting to my database what should be the problem is this a bug?
Posted 31 July 2013 - 03:08 AM
this is my code in my controller
Posted 31 July 2013 - 06:31 AM
Hello and welcome to the forums [member=revshare lanuza].
What is the structure of the table?
Is the table's date format compatible with the date format that is declared within application/config/grocery_crud.php on line:
//There are only three choices: "uk-date" (dd/mm/yyyy), "us-date" (mm/dd/yyyy) or "sql-date" (yyyy-mm-dd) $config['grocery_crud_date_format'] = 'uk-date';
If you put the birthday date as required does it let you save? If not then the entered date is not correct.
Also try to do this instead,
// replace this $this->db->insert('tblstudent',$post_array); return TRUE; // with this return $this->db->insert('tblstudent',$post_array);
I am not sure if this is going to make any changes but it's worth trying.
Posted 31 July 2013 - 11:45 AM
i used the default date of Grocery crud.
the Datepicker one,
i try this but it didnt work
return $this->db->insert('tblstudent',$post_array);
the date is not inserting into my database ,
but if i remove the callback_insert
the date is working.
i dont know what is the problem with this callback?_insert
Posted 31 July 2013 - 12:13 PM
Which version of CodeIgniter and Grocery CRUD do you use?
Posted 02 August 2013 - 06:18 AM
make a dump of the array you trying to insert ... check what are the exact values you getting. If the value you trying to insert .. is not in the proper format, it can create trouble inserting. share the dump of the post_array before making call to insert.. may be it can be of some help.