Click here to Skip to main content
14,643,383 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi, I am posting an agents name, father name and a JPEG image as array of bytes from android app to my codeigniter application and saving the received data in mysql data base table. The field type for storing image is Medium BLOB. But image bytes stored in database table are of IKB size. I do not know why the image bytes are lost. Here is my PHP code given below

$id = $this->input->post("AgentId");
$name = $this->input->post("name");
$father = $this->input->post("father");
$picture = $this->input->post("picture");
$data = array("AgentName" => $name, 
	"Father" => $father, 
	$picture" => $picture);

	$this->db->where("AgentId", $id);
	$this->db->update('agent', $data);


What I have tried:

I do not understand the issue I am new to code igniter
Posted
Comments
Richard MacCutchan 8-Feb-20 6:53am
   
Have you checked the documentation for syntax errors? Have you checked to see if either of those commands return a status code?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100