Hello!
I'm building a website that has two different image crud uploaders for two different tables.
I'm defining them like this:
$image_crud = new image_CRUD();
$image_crud->set_table('sketch_gallery');
$image_crud->set_primary_key_field('id');
$image_crud->set_url_field('url');
$image_crud->set_artist_profile($id)
->set_ordering_field('priority')
->set_image_path('assets/uploads');
$data['output'] = $image_crud->render();
$image_crud = new image_CRUD();
$image_crud->set_table('tattoo_gallery');
$image_crud->set_primary_key_field('id');
$image_crud->set_url_field('url');
$image_crud->set_artist_profile($id)
->set_ordering_field('priority')
->set_image_path('assets/uploads');
$data['output2'] = $image_crud->render();
For some reason, everytime I use the second uploader, the image gets uploaded into the first table. I thought it was some element id problem, but I changed it and I'm still facing the same problem.
I've lost literally 2 days trying to fix it, can please someone give me an hand?
Thank you!
