mySQL - SELECT and LIMIT data

0 votes
109 views
added Sep 24, 2019 in mySQL by lcjr First Warrant Officer (9,190 points)
<?php 
//PHP Limit Data From MySQL
//SQL query to select all records from 1 – 30 (inclusive) from a ‘Project_name’ table
 
$sql = "SELECT * FROM Project_name LIMIT 30";
 
//To select >start on record records 30 – 40 (inclusive) AND return only 10 records:
$sql = "SELECT * FROM Project_name LIMIT 10 OFFSET 29";

?>

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...