Tag : Last

ItSolutionStuff.com have tutorials for Last tag, here you can study articles of Last tag, Last tag posts collection, most popular and useful tutorials of Last tag, here you can find list of all relevant posts and example about Last tag, we have lists of tutorials and examples about Last tag. very simple and quick example collection of Latest Last tag.

How to get last record from MySQL table in Codeigniter?

In this post we are going to learn how to get last single record from MySQl database table using Codeigniter database library. We sometime require to get only single row result in our Codeigniter application. In this post you can see how to get whole last record using Codeigniter db query. Few day ago i posted <a href="http://itsolutionstuff.com/post/how-to-get-last-inserted-id-in-codeigniterexample.html" target="_blank">"How to get last inserted id in Codeigniter?"</a>, in that post we can simply get last inserted id from Codeigniter db query. In this database query i used order_by(), limit.....

By Hardik Savani | March 9, 2017 | | 37382 Viewer | Category : MySql Codeigniter

How to get last 2 days records from table using Mysql Query?

We may sometimes require to get few days ago records from table like last 2 days, last 3 days, last 10 days or last 15 days etc. Most of developer choose other logic but we can easily get using mysql query(using CURDATE and INTERVAL). In this example mysql query i have one table "elements" and columns are id, title, description, created_at(timestamps) and update_at, Now we will get all records of last 2 days.so you can fetch fields value using CURDATE and INTERVAL of mysql. In following example you can see how to select data of last two days. <strong>Query:</strong> <pre> SELECT * FROM `elem.....

By Hardik Savani | July 22, 2016 | | 32691 Viewer | Category : PHP MySql

How to get last record of database table in Laravel?

Sometimes we may require to get only last record of table in our project, we can get several way. We can fetch last record of database table using latest() or orderBy(). In bellow example you can see how i get then last record of table. I have "items" table and i want to get last record of "items" table. In first example i use latest() with first() because latest() will fetch only latest record according to created_at then first() will get only single record: <strong>Using latest() belong to created_at field:</strong> <pre class="prettyprint lang-php"> $last = DB::table('items')->latest()->f.....

By Hardik Savani | July 14, 2016 | | 74829 Viewer | Category : Laravel

How to get last executed query in Larave 5?

We have been many time need to get executed query log or you want to get last executed query or maybe if you want to diaplsy sql query from laravel query builder then you can do it that. so i have three example for display executed query in Laravel 5. when you are working on laravel application at that times , i think you need many time to print last run query or if you want to check direct from phpmyadmin sql box, so at that time you have to follow this three example. so, let's see three example of getting sql query from Laravel Query Builder. <strong class="step">Example 1:</strong> In this.....

By Hardik Savani | April 10, 2016 | | 57758 Viewer | Category : Laravel

Git remove last commit from local

Git is distributed version control system that is a awesome. when ever you are working with git repository. if you did commit your code in your local system by mistake, then if you want to remove last commit from your project. so let's see following example: <strong class="example">Example:</strong> <pre class="prettyprint lang-php"> git add . git commit -m "change for test" git reset --soft HEAD~ </pre>

By Hardik Savani | March 18, 2016 | | 16877 Viewer | Category : Git