Thank you very much for your replay
table structure :
id
image1
image2
image3
image4
First question :
Edit form
ImageName1 delete
ImageName2 delete
ImageName3 delete
ImageName4 delete
ImageName1 delete
$crud->set_field_upload('image1','assets/uploads/files');
$crud->set_field_upload('image2','assets/uploads/files');
$crud->set_field_upload('image3l','assets/uploads/files');
$crud->set_field_upload('image4l','assets/uploads/files');
$crud->callback_before_delete(array($this,'delete_file'));
public function delete($primary_key)
{
$this->db->where('id',$primary_key);
$user = $this->db->get('tableName')->row();
//If File exists
//delete it
}
Exemple
The user has deleted imageName1 So I need the file name storted in the databse under image1 fto unlink teh file from files directory
$user = $this->db->get('tableName')->row(); will return files names of file1 , file2, file3 and file4
I need a mean to get only the file name of the file that had been deleted
Thank You