displaying BLOB data from DB |
[eluser]Colin Williams[/eluser]
What happens when you go to this function in your address bar? Do you see the image?
[eluser]junaids[/eluser]
i have changed th controller a bit Code: function image() where user is the DB table and Profile_picture is the user table field. now when i go to this function in address abr it gives many errors like. Severity: 4096 Message: Object of class CI_DB_mysql_result could not be converted to string. where m i wrong?
[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');
[eluser]junaids[/eluser]
sorry to b so irritating. my controller is like Code: function image() now with the function url i m getting the url on the page. with image (PNG image) in the title
[eluser]Zeeshan Rasool[/eluser]
Also you can get help here, CI_DB_mysql_result could not be converted to string |
Welcome Guest, Not a member yet? Register Sign In |