I'm looking to create some basic text fields which will introduce logic inside of database queries which is done.
Unfortunately there's a compatibility problem where the database doesn't exist when submitting the form.

Can anybody provide examples of a hook_form_submit() where:
- vget is used to install a module's schema in a table of the same value as the variable, or
- the same function as the first point but instead of simply changing the reference, migrating all data into a new table with the existing schema and removing the old.

I can't find any working examples using this functionality, the submit button simply breaks into a PDO Exemption.
I could supply some code examples, but none have worked so far in the same extent as being usable.

Comments

fubarhouse’s picture

I've stumbled across db_rename_table().
Would there be an optimal way to get the name of the table in use by the schema to store in memory before calling that function?

fubarhouse’s picture

I've managed to get this in place...

By storing the current setting of the text field on form load and using that as a basis for the rename function, I can continue to use the new value in the rename function.

My bad.

:)