How to Import CSV file data to MySQL in CodeIgniter 4

CSV is a widely used format for exchanging data between applications.

The database and data dumps should be in a proper format to import data smoothly and without any issue.

In this tutorial, I show how you can import CSV file data in the MySQL database in the CodeIgniter 4 project.

How to Import CSV file data to MySQL in CodeIgniter 4

Read more

CRUD (Create Read Update Delete) in a CodeIgniter 4

CRUD (Create, Read, Update, and Delete) is a basic requirement when working with database data.

In this tutorial, I show how you can select, insert, update, and delete a record from the MySQL database in the CodeIgniter 4 project.

In the example, I am creating a page to add a new subject and list subjects with the edit and delete buttons.

CRUD (Create Read Update Delete) in a CodeIgniter 4

Read more

Edit Delete DataTables record with AJAX and PHP

With the use of the DataTables jQuery plugin, you can list your records in pagination format.

You can add HTML elements like – buttons, link, image, etc with a record.

For this need to pass element in HTML string format from the PHP script.

In this tutorial, I show how you can add edit and delete buttons in the Datatables AJAX pagination with PHP.

NOTE – I am using the Bootstrap modal to update a record.

Edit delete DataTables record with AJAX and PHP

Read more

How to Export MySQL data to CSV by Date range with PHP

CSV file is been used for data import, export, and generating a report.

If you have huge data available in the MySQL database and you only require a specific date range data but the file contains all records and you need it on your own.

By adding a date filter to the form you just need to pick the range and export it.

In this tutorial, I show how you can export MySQL database data in CSV format by date range with PHP. I am using jQuery UI for datepicker.

How to Export MySQL data to CSV by Date range with PHP

Read more