How to randomly select database rows in MySQLi

How to randomly select database rows in MySQLi
How to randomly select database rows in MySQLi

I am making this tutorial for randomly select database rows in Mysql. This is my number ten article. I am create first a HTML page then write Custom CSS and use additional bootstrap CSS and JS. After create HTML page then converted PHP page then create MySql database.

Four rows in my database. Please make this database carefully and I’m create a video tutorial below how to insert data in Mysql database. Download this code. Download option is below end of the article. Try Now.

Making Database

CREATE TABLE `rand` (
`id` int(11) NOT NULL,
`name` varchar(100) NOT NULL,
`address` varchar(100) NOT NULL,
`ph` varchar(100) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

INSERT INTO `rand` (`id`, `name`, `address`, `ph`) VALUES
(1, 'Jon Tab', 'Malaysia', '963258745'),
(2, 'Sur Bharda', 'Island', '56326587'),
(3, 'Samresh Kumar', 'Kochi', '2458745214'),
(4, 'Duo Falla', 'Muka', '326587452'),
(5, 'Solly Han', 'Tubatu', '4569875214'),
(6, 'Silli Tand', 'Paru', '78563215478');

index.php

This PHP page showing our result. This code handling large volumes of data to randomly select.


How to randomly select database rows in MySQLi
 	 	 	

 	 	 	  






How to randomly select database rows in MySQLi

fetch_assoc()) { ?> [PHP] [PHP]
Sl No Name Address Phone No
Saurav Sen

Saurav Sen

Hi, I am a professional blogger and web developer. So I also share experiences with web development tutorials and blogging tips and including writing about HTML, CSS, JavaScript, Jquery, Ajax, PHP, and MySQL.