Infolinks

Breaking

Adsense

Friday, April 22, 2016

UPDATE MULTIPLE ROWS USING PHP AND MYSQLI

Most of the Information Systems that we encounter updates one record at a time. That is quite easy to achieve. I already created an article related to updating a single record. But what if you need to update multiple records at the same time? That’s a bit tricky and you need to use a FOR loop to achieve it. I encountered the same problem and needs a little googling thing.

So, I have here a code that allows you to update several records at the same time. I find this one on one of the projects I created last time which is an elearning system. The code updates the attendance of the whole class. We need two (2) tables namely the student table and the attendance table.

STUDENT TABLE

ATTENDANCE TABLE

 OUTPUT UPDATE MULTIPLE ROWS


DOWNLOAD UPDATE MULTIPLE ROWS FILE HERE

Database name: elearning
Files: attendance.php and attendance_update.php

The code on the attendance.php file will display the names of students together with their grade from the attendance table. While the code on attendance_update.php file will update all changes in the attendance form and will return to attendance.php page.

Goodluck! ^_^


UPDATE MULTIPLE ROWS USING PHP AND MYSQLI

No comments:

Post a Comment

Adbox