Copy link to clipboard
Copied
Hi,
I'm trying to set up a CS4 Insert Record Server Behavior to add information submitted from a single form to two tables.
If a user submits the form they send their eMail address and a question.
So, I have two tables in the database: 1) person with the eMail field, and 2) questions with a questions field.
Because one user can submit multiple questions at different times and days using their same eMail address, any additional questions should be added only to the questions table and linked to their foreign key.
I'd appreciate any help or reference links.
Thank you,
Andrew
Copy link to clipboard
Copied
Server behaviors do not support inserting into multiple tables. The best solution for this is probably a stored procedure.
Copy link to clipboard
Copied
Thanks for your reply!
I'm using PHP & it doesn't look like there's support for PHP/MySQL stored procedures. ASP, JSP and ColdFusion are supported.
Copy link to clipboard
Copied
Ptrlwladf wrote:
I'm using PHP & it doesn't look like there's support for PHP/MySQL stored procedures.
That's because MySQL didn't support stored procedures until version 5.0. The Dreamweaver server behaviors were created when MySQL 3.23 was the standard.
It's not something that many people like to be told, but you won't get very far at all if you rely on using Dreamweaver server behaviors. They are useful for rapid prototyping and simple operations, but if you want anything more sophisticated, you need to learn how to code it yourself.
Copy link to clipboard
Copied
David, thanks for your reply!
Could you recommend PHP and MySQL texts to start learning coding,...and more advanced texts?
I have your book The Esstential Guide to Dreamweaver CS4 with CSS, AJAX and PHP, which very nicely covers DW CS4. Also, is there a release date for the CS5 Essential Guide...?
Thank you,
Andrew
Copy link to clipboard
Copied
Ptrlwladf wrote:
Could you recommend PHP and MySQL texts to start learning coding,...and more advanced texts?
Well, since you've got my CS4 book, you can learn a lot of coding from that. If you want a book that concentrates more on coding outside the Dreamweaver context, my "PHP Solutions" is software-neutral. "PHP and MySQL Web Development" by Wellings and Thomson is also software-neutral. I haven't seen the latest edition, but the first edition was excellent, so I've no reason to believe the current one isn't as good.
Also, is there a release date for the CS5 Essential Guide...?
I'm not sure if there will be a CS5 edition. I'm currently discussing a book with a different publisher. All I can say at the moment is that it will definitely be about PHP.