Project / Support Center
Welcome, Guest. Please login or register. February 27, 2020, 11:44: PM
Home Help Search Login Register
D-Web Web Site Creator D - Web Web Site Creator On-line HTML Editor No Programming knowledge required. Web Global Net PayPal-Cart Shopping Cart System PayPal - Kart Shopping Cart System for E-Commerce over the internet, that's easy to use. Web Global Net Newsletter Manager Newsletter Manager On-line Newsletter Creator with Email Subscriber Management.
Ring Central Discount
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  MySQL  |  Topic: Adding a TRIGGER to Mysql table to copy entries from a table to a back up table 0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Send this topic Print
Author Topic: Adding a TRIGGER to Mysql table to copy entries from a table to a back up table  (Read 108 times)
admin
Administrator
******
Offline Offline

Posts: 181


« on: February 04, 2020, 02:38: PM »

Go to the table you want to backup in phpadmin in this case it is country.

Next go to the trigger tab and click on add new trigger name the trigger what you want and include root@localhost in the definer.

The blue portion defines the table fields you want to copy- make sure the table is different (in this case the blue bold )
The red portion defines where the values are inserted

You do need to include the fields in the same order that the table structure is in.

INSERT INTO class
(`group_id`,
`creation_date`,
`group`,
`creation_year`,
`creation_month`)


values
(
NEW.group_id,
NEW.creation_date,
NEW.group,
NEW.creation_year,
NEW.creation_month

)


* Screenshot 2020-02-04 08.42.59.png (89.29 KB, 699x495 - viewed 23 times.)
« Last Edit: February 13, 2020, 05:53: PM by admin » Report to moderator   Logged

The Unknown Webmaster
Pages: [1] Go Up Send this topic Print 
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  MySQL  |  Topic: Adding a TRIGGER to Mysql table to copy entries from a table to a back up table « previous next »
Jump to:  


Login with username, password and session length
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!