codeigniter get last inserted data row
$db = db_connect();
$query = $db->query("SELECT * FROM users ORDER BY id DESC LIMIT 1");
$result = $query->getRow();function add_post($post_data){
$this->db->insert('posts', $post_data);
$insert_id = $this->db->insert_id();
return $insert_id;
}
Also in PHP:
- find length of string in php
- <?PHP>
- datetime object to string php
- console.log php variables
- collection methods laravel
- Multiple image upload with CodeIgniter
- determine with index has a value in php
- apt install php7.4-mysql
- 6 digit alphanumeric random code generator php
- date +1 day
- display current date in php
- change php version ubuntu
- add 2 days in php
- check if string has this word php
- codeigniter base url automatic
- Warning: get_browser(): browscap ini directive not set in
- check if character in string php
- add() in php
- facade laravel str number
- dispaly eroor php
- curl in php
- default header value in php
- array key exists php after submit
- Jul 29th, 2020 php format