codeigniter get last insert id
$id = $this->db->insert_id(); $db = db_connect();
$query = $db->query("SELECT * FROM users ORDER BY id DESC LIMIT 1");
$result = $query->getRow(); $this->db->insert('posts', $post_data);
$insert_id = $this->db->insert_id();
return $insert_id;
Also in PHP:
- check the php version in ubuntu
- data seeding in laravel
- * in array key php
- Laravel store multiple files
- clear cash in laravel
- database seeding
- db seeder laravel 5
- Class 'App\Http\Controllers\File' not found
- Allowed memory size of 1610612736 bytes exhausted laravel 8
- Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:cer
- default port for phpmyadmin
- array_key_exists php $_POST
- find ip address with php
- acf meta field query
- display product page title in field cf7
- cors header ‘access-control-allow-origin’ missing IN PARTICULAR CAKEPHP API
- clear cache artisan
- dynamic carousel bootstrap php
- Class 'App\Http\Controllers\Auth' not found
- cake tmp name
- exception php try catch
- composer in laravel
- as type php
- category hierarchy laravel