Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Inserting from a Form to multiple MySQL tables using CS4 Server Behaviors

New Here ,
Feb 04, 2010 Feb 04, 2010

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

TOPICS
Server side applications
1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 04, 2010 Feb 04, 2010

Server behaviors do not support inserting into multiple tables. The best solution for this is probably a stored procedure.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 05, 2010 Feb 05, 2010

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 05, 2010 Feb 05, 2010

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 05, 2010 Feb 05, 2010

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 05, 2010 Feb 05, 2010
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines