• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Storing images in database using active record

#14
[eluser]Unknown[/eluser]
I need to store images on DB, because the DB is shared with other projects that retrieves images from the tables. Anyway, I found the solution. Just need to specify the field to be stored in raw format, and not escaped by active record. And this is the way to do this is:

Code:
$this->db->set( $book );
$this->db->set( 'cover', "'" . addslashes( $book['cover'] ) . "'", FALSE );
$this->db->insert( $this->tbl_name );

Thank you!!


Messages In This Thread
Storing images in database using active record - by El Forum - 10-18-2010, 05:44 AM
Storing images in database using active record - by El Forum - 10-18-2010, 10:03 PM
Storing images in database using active record - by El Forum - 10-19-2010, 06:59 AM
Storing images in database using active record - by El Forum - 10-19-2010, 08:15 AM
Storing images in database using active record - by El Forum - 10-19-2010, 09:21 AM
Storing images in database using active record - by El Forum - 10-19-2010, 10:09 AM
Storing images in database using active record - by El Forum - 10-19-2010, 10:41 AM
Storing images in database using active record - by El Forum - 10-19-2010, 11:12 AM
Storing images in database using active record - by El Forum - 10-19-2010, 12:49 PM
Storing images in database using active record - by El Forum - 10-19-2010, 03:12 PM
Storing images in database using active record - by El Forum - 10-19-2010, 03:53 PM
Storing images in database using active record - by El Forum - 10-19-2010, 04:12 PM
Storing images in database using active record - by El Forum - 10-19-2010, 04:28 PM
Storing images in database using active record - by El Forum - 10-21-2010, 02:41 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.