i have a table with 2 fields, the first is the id that references another table and is not unique, while the second is the name of an image.
my primary is both of them.
primary key ( id, images)
i need to add and delete entry so i tried this code:
//Carico la libreria CRUD
$this->load->library('grocery_CRUD');
$crud = new grocery_CRUD();
$crud->set_table('immagini');
$crud->required_fields('immagine');
$crud->set_relation('id','cani','nome');
$crud->set_field_upload('immagine','assets/uploads/files');
$output = $crud->render();
but when i try to delete one row the system delete all the entry with the same id...i need to handle this operation because that's not rigth for me, i need that only the selected row is deleted...can i handle the delete button?
i've already try with getState:
state = $crud->getState();
$state_info = $crud->getStateInfo();
if($state == 'delete')
{
$primary_key = $state_info->primary_key;
//Do your awesome coding here.
echo "handle";
}
but it doesn't work...