This topic is locked

How to do an Add Page that work with multiple tables

7/15/2011 11:10:18 AM
PHPRunner General questions
D
dfcastro author

Hi guys,
I have a problem here.
My database have a registration, and add page, that should allow me to insert a data inside a table (No big deal) but it has a relationship with a second table and a third table that is a cross reference table. So I have the table A, table B and table A_x_B.
The Add page should have:

C
cgphp 7/15/2011


  • all the form fields to persist the data to table A, and


The add page for table A automatically save the data in table A


  • a section that show all the registries of table B and


You can use a PHP snippet to retrieve records from tabel B: http://xlinesoft.com/phprunner/docs/adding_php_code_snippet.htm


  • an Add Button that would allow me to add an entrie to table B (maybe it could call the Add Page for table <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=59472&image=1&table=forumreplies' class='bbc_emoticon' alt='B)' />.


You can achieve this in two ways: using a custom button http://xlinesoft.com/phprunner/docs/inserting_button.htm or filling table B in the "After record added" of table A.