Forums

Two database

wwgg 14 Dec, 2016
On my website I have build a form to check a database for the existence of a record.

Everything works fine.
After the lookup I want to save the date, one field, and the IP number of the user.

I created a new table for that

I added a DB SAVE with the second table name.

The form keeps adding the records to the first LOOKUP table.. How can IU set a second table name to save the records in..

My debugger show me the correct table for the DBREAD: checkHartje

The second DB SAVE gives the WRONG table to update: it wants to save in the same table checkHartje. It should update MailsHartje


Array
(
    [37] => Array
        (
            [DB Read] => Array
                (
                    [Queries] => Array
                        (
                            [0] => SELECT `Data`.`id` AS `Data.id`, `Data`.`uniq_id` AS `Data.uniq_id`, `Data`.`user_id` AS `Data.user_id`, `Data`.`created` AS `Data.created`, `Data`.`modified` AS `Data.modified`, `Data`.`datum` AS `Data.datum`, `Data`.`lot` AS `Data.lot`, `Data`.`prijs` AS `Data.prijs` FROM `f17t2_chronoengine_chronoforms_datatable_checkHartje` AS `Data` WHERE `Data`.`lot` = '888888'
                        )

                )

        )

    [45] => Array
        (
            [DB Save] => Array
                (
                    [Queries] => Array
                        (
                            [0] => INSERT INTO `f17t2_chronoengine_chronoforms_datatable_checkHartje` (`lot`, `user_id`, `created`) values ('888888', '0', '2016-12-14 15:27:45');
                        )

                )

        )

)
GreyHead 14 Dec, 2016
Hi wwgg,

The DB Save should update the table it is set to. I can't see any explanation from the information here.

I assume that you have the DB Read in the On Load event and the DB Save in the On Submit event?

Bob
This topic is locked and no more replies can be posted.