Welcome Guest, Not a member yet? Register   Sign In
displaying BLOB data from DB
#13

[eluser]Colin Williams[/eluser]
$image_data is a result object. It contains the string you want, but it is not the string you want. So sending it to imagecreatefromstring() is failing. Are you familiar with using the DB class? You'll want something like

Code:
$result = $this->db->get('user');
$image_data = $result->row();
$image = imagecreatefromstring($image_data->blob_field);


Messages In This Thread
displaying BLOB data from DB - by El Forum - 05-11-2009, 12:37 AM
displaying BLOB data from DB - by El Forum - 05-11-2009, 04:02 AM
displaying BLOB data from DB - by El Forum - 05-11-2009, 06:02 AM
displaying BLOB data from DB - by El Forum - 05-11-2009, 06:11 AM
displaying BLOB data from DB - by El Forum - 05-12-2009, 03:20 AM
displaying BLOB data from DB - by El Forum - 05-12-2009, 03:32 AM
displaying BLOB data from DB - by El Forum - 05-12-2009, 03:50 AM
displaying BLOB data from DB - by El Forum - 05-12-2009, 03:59 AM
displaying BLOB data from DB - by El Forum - 05-12-2009, 04:00 AM
displaying BLOB data from DB - by El Forum - 05-12-2009, 08:27 AM
displaying BLOB data from DB - by El Forum - 05-12-2009, 01:18 PM
displaying BLOB data from DB - by El Forum - 05-12-2009, 02:19 PM
displaying BLOB data from DB - by El Forum - 05-12-2009, 02:24 PM
displaying BLOB data from DB - by El Forum - 05-12-2009, 02:34 PM
displaying BLOB data from DB - by El Forum - 06-21-2009, 11:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB