Tutorials

How to use SQL Limit to Limit Results in PHP/MySQLi

The use of limit limits the number of results of your MySQL Query and is usually at the last part of your SQL. This is most applicable if for example, you want to get the top selling product, you just need to order the result then limit it by 1. This tutorial will teach you how to use this limit. Note: Bootstrap CSS and script used in this tutorial are hosted, therefore, you need internet connection for them to work.

Creating our Database

First step is to create our database. 1. Open phpMyAdmin. 2.