Hy,
How do I fill a array with data at database?
Example:
->change_field_type('id', 'enum', array('here I want fill with a select '));
⚠ 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 08 May 2013 - 13:36 PM
Hy,
How do I fill a array with data at database?
Example:
->change_field_type('id', 'enum', array('here I want fill with a select '));
Posted 08 May 2013 - 19:24 PM
$enum = array();
$result = $this->db->get('your_table')->result_array();
if (!empty($result))
{
foreach ($result as $item)
{
$enum[] = $item['name'];
}
$crud->change_field_type('id', 'enum', $enum);
}
Posted 11 May 2013 - 16:05 PM
Thanks my friend.
My form update, edit and add are ok at table content
I am calling callback_after_update('insert') and my function
Posted 12 May 2013 - 06:28 AM
Can you post your controller's code?
Posted 13 May 2013 - 01:46 AM
This my controller
Posted 13 May 2013 - 14:39 PM
Posted 16 May 2013 - 12:38 PM
Sorry everyone.
Posted 16 May 2013 - 15:50 PM
Posted 19 May 2013 - 01:07 AM
Posted 19 May 2013 - 07:30 AM
Are you using HMVC? Something else?
I haven't use them before so I woudln't know how to help you.
Posted 19 May 2013 - 15:47 PM
Yes I use HMVC.
Ok, thanks for help at moment David.