⚠ 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. ⚠

  •     

profile picture

Select a specific image from IC



Sukys
  • profile picture
  • Member

Posted 31 March 2015 - 11:08 AM

Hello again, guys!

 

I need to select a specific image from DB using the Image Crud. But I did not find how. 

Can someone help me?

 

Thanks.


voghDev
  • profile picture
  • Member

Posted 31 March 2015 - 15:44 PM

What do you mean with selecting a specific image?


Sukys
  • profile picture
  • Member

Posted 31 March 2015 - 18:09 PM

If I have 30 images from DB, I need to show only 01 with image Crud. How do I do that?


voghDev
  • profile picture
  • Member

Posted 01 April 2015 - 14:55 PM

Is your code similar to this?
 
$image_crud = new image_CRUD();
 
$image_crud->set_primary_key_field('id');
$image_crud->set_url_field('url');
$image_crud->set_table('imagecrud_tmp') 
->set_image_path('assets/uploads');
 
$output = $image_crud->render();
 
$this->_example_output($output);
 
What I would do is have a look at the image_CRUD class to see if you can use the $image_crud object to do some sort of filtering, getting one object instead of all 30. Luckily you have full access to the code and can search for it :-)