Nov 20th, 2010, 10:03 AM
Hi jguerra,
Interesting problem!
That's how I'd tackle it, yes. Form Tools pretty much revolves around the idea of the fact that it creates and manages it's own database tables. Trying to circumvent that and getting it to link to a non-Form Tools-built table isn't a good idea - you'd have too many problems.
Instead, doing some sort of
There's a few ways you could do it, but none are terribly simple. You'd definitely need a programmer handy.
1. One would be to add some sort of trigger on the MySQL table that runs a custom script when a new row is inserted. This script would copy that data over to your custom table. I know this is possible, but I'm afraid I haven't done this myself so don't have much advice.
2. Write a separate PHP script that you could run that does the same. In this case, you would also need to keep track of what records have already been copied over. I'd suggest either logging the submission ID somewhere in a log file, or actually storing the submission ID in the new table - to prevent copying over records multiple times.
Sorry for the rather high-level advice, but it'll take a little work to get this working as you need!
- Ben
Interesting problem!
Quote:Would it make more sense to just link the ft_ table to my existing table instead and do some kind of post-processing thing?
That's how I'd tackle it, yes. Form Tools pretty much revolves around the idea of the fact that it creates and manages it's own database tables. Trying to circumvent that and getting it to link to a non-Form Tools-built table isn't a good idea - you'd have too many problems.
Instead, doing some sort of
There's a few ways you could do it, but none are terribly simple. You'd definitely need a programmer handy.
1. One would be to add some sort of trigger on the MySQL table that runs a custom script when a new row is inserted. This script would copy that data over to your custom table. I know this is possible, but I'm afraid I haven't done this myself so don't have much advice.
2. Write a separate PHP script that you could run that does the same. In this case, you would also need to keep track of what records have already been copied over. I'd suggest either logging the submission ID somewhere in a log file, or actually storing the submission ID in the new table - to prevent copying over records multiple times.
Sorry for the rather high-level advice, but it'll take a little work to get this working as you need!
- Ben