How to get last insert id in Codeigniter
$this->db->insert(‘users’, $data); # where $data is an array
$insert_id = $this->db->insert_id(); # insert_id() fucntion returns last insert id
return $insert_id;
$this->db->insert(‘users’, $data); # where $data is an array
$insert_id = $this->db->insert_id(); # insert_id() fucntion returns last insert id
return $insert_id;
<!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> <!-- Optional... read more
After a lots of headache, I find the solutions. I am using... read more
Following Code is required for that: echo $this->Html->image("your_img.png", array( 'url' => array('controller' => 'some_controller',... read more
Below code can be helpful $this->response->file($this->DIR.$file, array('download' => true, 'name' => "$file")); read more
"To Fix ""Error Establishing a Database Connection in WordPress"": Open wp-config.php file and... read more
Create a DIR in your laravel app root and name it "myapp", you... read more
Try "keypress" evenHandler in jQuery: Notice Below Code, Although this code is correct... read more
"There may be several other possible ways, but I know one simple... read more
This can be achieved using a single query with join. We can... read more
Login to Admin panel Click on People Click on Roles and create Custom Role... read more
Leave a Reply
You must be logged in to post a comment.