Category: Mysql (Page 2 of 5)

PHP MySQL get last row of a table in database

Last updated on February 25th, 2022 at 08:15 amIf you have auto_increment field set for MySQL table then it is very easy to get details of last row in that table. I have also provided complete php code on how to get details of last n rows in a MySQL table. We have provided code […]

How to read excel file and insert into MySQL using PHP

Last updated on December 15th, 2022 at 03:56 pmMany webmasters face issues while reading Microsoft excel spreadsheet data and insert them into the mysql database. Here is simple script that can read the excel file data and display it on the page. User also has the ability to validate the details and then using a […]

How to search using MySQL prepared statement and PHP

Last updated on March 7th, 2022 at 03:56 pmEnabling content search is always very important for a large website especially when you have lot of pages. I am going to explain this in both regular mysqli procedural approach and also using prepared statements. This script also count number of rows returned from the search. The […]

How to Quickly Duplicate Your MySQL Table Data

Last updated on November 14th, 2024 at 01:12 pmDevelopers may occasionally need to create a duplicate of their production tables to ensure a backup or for specific calculation purposes. Below is an example illustrating how to duplicate data from one MySQL table to another by utilizing the INSERT INTO and SELECT statements. Assuming both tables […]

« Older posts Newer posts »