fetch last inserted data with record in php codeingniter
function add_post($post_data){
$this->db->insert('posts', $post_data);
$insert_id = $this->db->insert_id();
return $insert_id;
} $db = db_connect();
$query = $db->query("SELECT * FROM users ORDER BY id DESC LIMIT 1");
$result = $query->getRow();
Also in PHP:
- date format in am pm in php
- basd64 decrtpy php
- check if a string is url or not php
- check array key exit php
- .lenght en php string
- add 1 day to date using php
- disable updated_at laravel
- convert stdclass object to array php
- find data format in php
- add unique value in array php
- code php ajout heure
- Connect to SQL in a php PDO and print the data in it
- Return the union of this RDD and another one
- check if key exists in array php
- curl php
- do_shortcode not working
- cache clear of app.php laravel
- array key exists php child child nodes
- eliminar ultimo caracter string php
- 500 error coming on laravel site
- capitalized string in php
- check if string not contains php
- create user laravel seeder
- error reporting in php means