This can be a PHPMaker challenge file that can present you how one can create a PHP net utility that can insert a brand new file into an identical desk in one other database, when a brand new file is inserted into the present database. In different phrases, this challenge makes use of two completely different database connection. The extra database connection is dealt with by a “Linked Tables” function in PHPMaker challenge.
For simplicity, then the tables schema are the identical between the primary database connection and the extra linked desk database connection. You may do that challenge by your self in your pc. You’ll study some necessary issues about how one can implement “Linked Tables” through the use of the “Row_Inserted” server occasion out of your PHPMaker challenge.
WHY SHOULD I USE THIS PROJECT?
By utilizing this PHPMaker challenge, then you’ll study:
1. Find out how to setup one other database connection utilizing “Linked Tables” function, apart from utilizing the prevailing primary database connection.
2. Find out how to write a easy PHP code that can execute the INSERT INTO SQL to a different desk, through the use of “Row_Inserted” server occasion.
3. Find out how to use one other database connection from “Linked Tables”, and implementing it through ew_Execute() international perform.
4. Find out how to re-synchronize a PHPMaker challenge file with out having to lose all of the customization/settings within the present challenge.
5. Find out how to create and generate an internet utility inside only some minutes.
Minimal model: PHPMaker 2018.
Initially created on Could 8, 2018 through the use of PHPMaker 2018.
The one extension is utilized by this challenge is “DateTimePicker”. This extension is shipped with PHPMaker built-in. You may merely allow it from: “Instruments” -> “Extensions” -> “Sort: Date/Time Picker”.
1. Create two databases: “codecanyon_linked1” and “codecanyon_linked2” respectively.
2. Run the “codecanyon_linked1.sql” script inside “codecanyon_linked1” database, as a way to create a brand new desk named “table1”.
3. Run the “codecanyon_linked2.sql” script inside “codecanyon_linked2” database, as a way to create a brand new desk named “table2”.
4. Run the “codecanyon_linkedtables.pmp” through the use of PHPMaker utility.
5. Change the connection information within the “Database” tab, then click on “Instruments” -> “Synchronize”, to replace the primary database connection information.
6. Click on on prime menu: “Edit” -> “Add Linked Tables”, choose “codecanyon_linked2 (var: codecanyon_linked2, sort: MySQL)” from the “Database” choice checklist (error might happen as a result of the username and password are incorrect, ignore it).
7. Click on on the “Synchronize database” button to show “Database Connection” dialog window as a way to change the database information, change the connection information, after which click on on “Synchronize” button to synchronize the brand new setting and shut the shape.
8. Click on on the “Generate” tab, change the vacation spot folder to the place you need to output the generated information from “Software root folder” and “Vacation spot folder” respectively.
9. If you happen to use your personal PC as a testing server, setup your testing net server (learn “Generate Settings” -> “Testing net server” within the assist file), verify “Browse after technology” if you’d like PHPMaker to open your browser after technology,
10. Click on on the “Generate” button and wait till all of the information are generated,
11. When script technology is completed, add the information to your testing server if obligatory.
12. Browse the web site.
1. Be sure you have already run/open the “codecanyon_linkedtables.pmp” file through the use of PHPMaker utility.
2. Click on on “table1” from “Database” pane on the left facet of your PHPMaker challenge.
3. Click on on “Code (Server Occasions, Shopper Scripts and Customized Templates)” tab.
4. Go to this location: “Server Occasions” -> “Desk-Particular” -> “Frequent”, and see the code in “Row_Inserted” part.
TRY THE GENERATED WEB APPLICATION
1. Run the generated net utility out of your favourite browser.
2. Be sure you have already chosen “desk 1” menu.
3. Click on on ”+” (Add) button to open the Add kind web page.
4. Within the “desk 1 Add” kind web page, fill within the “Description” and “Date” fields.
5. Click on on “Add” button to save lots of that new file, and ensure the insertion course of is efficiently.
6. Test that new file in “desk 2”, by clicking on the “desk 2” menu merchandise.
7. Make it possible for new file is already exists within the “desk 2”.