The To Database add-on allows you to insert, update, or deletes rows from the database based on the information collected by the forms.
The To Database add-on is accessible through the "Contact > Extensions" menu option.
The initial "To Database" screen includes the list of forms in which the add-on is being used and a section for integrating the add-on into other forms.
The add on - form integration screen appears by pressing the "Settings" or "Add Integration" buttons in the initial screen. It loads the list of queries associated with the form.
The query list section allows you to edit, delete or add new queries. It is possible to associate multiple queries to a form, which are evaluated in the order in which they were created.
The add-on supports three types of queries: INSERT, UPDATE and DELETE. All of them have a common section with the "title" attribute to identify the query. The "Type" attribute to select the type of query (INSERT, UPDATE, DELETE). And the database connection configuration.
The database connection section includes a checkbox to use the website database. Or you can untick the checkbox to enter the database connection attributes manually, "Hostname", "Username", "Password", and "Database".
Each query type enables a specific set of attributes.
Insertion Query
By pressing the "Add pair" button adds additional columns/fields to the query.
Update Query
The "Where" section allows you to filter the rows to be updated.
Delete Query
The plugin allows you to enter the queries manually by ticking the "Custom query" option.
With queries you can use the constants supported by the recordset tags.
By checking the logs checkbox, the add-on will add a new record in the error logs file on the server each time a query fails.