Spread same value to two tables *not autofill*
Posted: 2018-03-13 13:57
How to input the data in a field and once the record is created copy this value and insert it in a different table?
I was thinking 'sql set' in the tablename.php file in the insert function, can someone share a functioning script for this scenario?
Create new record -> table1.field1 = test1 -> hit the create button, then if u query table1.field1 = test1 and query M_Table.field1 = test1
The reason behind it is to create a master hidden table which I can filter and make customized searches since appgini does not support the creation of a view, so this master table would have all the values from all other tables. Example:
Table1.field1 = test1
Table1.field2 = test2
Table1.field3 = test3
Table2.field1 = test4
Table2.field2 = test5
M_Table.field1 = test1
M_Table.field2 = test2
M_Table.field3 = test3
M_Table.field4 = test4
M_Table.field5 = test5
I was thinking 'sql set' in the tablename.php file in the insert function, can someone share a functioning script for this scenario?
Create new record -> table1.field1 = test1 -> hit the create button, then if u query table1.field1 = test1 and query M_Table.field1 = test1
The reason behind it is to create a master hidden table which I can filter and make customized searches since appgini does not support the creation of a view, so this master table would have all the values from all other tables. Example:
Table1.field1 = test1
Table1.field2 = test2
Table1.field3 = test3
Table2.field1 = test4
Table2.field2 = test5
M_Table.field1 = test1
M_Table.field2 = test2
M_Table.field3 = test3
M_Table.field4 = test4
M_Table.field5 = test5