Tag : Inserted Id


How to get last inserted id in Codeigniter?

Sometimes, we require to get last insert record id from database in controller, so in this example we will learn how to get last inserted row id in Codeigniter 3 project. It's very often need to get last insert id in programming field, if you are working on Codeigniter framework and you want to fetch last created id, i mean max id, then you do easily.Codeigniter provide method insert_id() to get last inserted id. insert_id() is function of "db" library. db library provides several function for connecting database task. insert_id() will return id of last inserted record. So here i give contro.....

By Hardik Savani | February 28, 2017 | | 2793 Viewer | Category : MySql Codeigniter
READ MORE

How to get last inserted id in laravel 5?

Its very common need to get last insert id in programming field, if you are working on laravel framework and you want to fetch last created id, i mean max id, then you do easily.laravel provide method to get last inserted id. If you are working with DB::table() then you have to use insertGetId() for insert data into database. this function always return inserted record id(primary key).it is very simple way to get id, in following example you can see and undestand more: <strong>Example:</strong> <pre class="language-php"> public function getLastInsertedIdDB() { $id = DB::table('items')->inser.....

By Hardik Savani | February 6, 2016 | | 26368 Viewer | Category : Laravel
READ MORE

    Jquery Select2 - Select box with search example code

    Jquery Select2 - Select box with search example code

    Open Post

    laravel 5.4 New Feature - Add eloquent whereKey method

    laravel 5.4 New Feature - Add eloquent whereKey method

    Open Post

    Laravel 5 - generate PDF from html view file and download using dompdf

    Laravel 5 - generate PDF from html view file and download using dompdf

    Open Post

    Bootstrap form validation example with demo using validator.js plugin

    Bootstrap form validation example with demo using validator.js plugin

    Open Post

    iOS 7 style switches for checkboxes example using switchery JS

    iOS 7 style switches for checkboxes example using switchery JS

    Open Post

    Solved - Access Not Configured. Google+ API (truncated...) on google console developer

    Solved - Access Not Configured. Google+ API (truncated...) on google console developer

    Open Post