Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900