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

How do I create a One to many relationship page in Dreamweaver?

New Here ,
Dec 17, 2009 Dec 17, 2009

Copy link to clipboard

Copied

How do I create a page in dreamweaver that comes up after the user logs in from the log in page that will allow the user to:

Add, change and delete in 2 tables that are in my MYSQL database that is a one to many relationship


One thing that is confusing is how the foreign key that links to the one side of the relationship is created in the many side without the user inputting the foreign key each time adding information to the many side table.


I am creating this in Dreamweaver using a MYSQL database and PHP.

TOPICS
Server side applications

Views

454
Translate

Report

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 ,
Dec 17, 2009 Dec 17, 2009

Copy link to clipboard

Copied

I would use a stored procedure to handle this. AFAIK, Dreamweaver behaviors do not handle multiple table updates/inserts.

Votes

Translate

Report

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 ,
Dec 18, 2009 Dec 18, 2009

Copy link to clipboard

Copied

Can you tell what the stored procedures would be?

Would the following be a part of it:

Outer join

set

Votes

Translate

Report

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 ,
Dec 18, 2009 Dec 18, 2009

Copy link to clipboard

Copied

I have moved this thread to the Dreamweaver Application Development forum, which is the appropriate place for discussion of database and other server-side issues.

Paulbreininger wrote:

Can you tell what the stored procedures would be?

Before asking that question, you need to establish whether your version of MySQL supports stored procedures. They were added to MySQL only in version 5.0. Many hosting companies are still running older versions.

The other point you need to take on board is that Dreamweaver's PHP server behaviors don't support stored procedures. Whichever route you finally take, you will need to code everything yourself.

Votes

Translate

Report

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 ,
Dec 18, 2009 Dec 18, 2009

Copy link to clipboard

Copied

LATEST

>Would the following be a part of it:

>

>Outer join

Probably not. When updating/inserting/deleting from 2 tables you perform each seperately. Table updates may join two or more tables to resolve the correct row(s) but you still only update one table at a time. Procedurally you would create a transaction, update the first table, update the second table and then commit the transaction.

EDIT: Well I take back my last comment. I see that MySQL does seem to support multiple table updates. I don't use MySQL so I can't really help you on that but the MySQL manual gives pretty clear syntax.

Votes

Translate

Report

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
Enthusiast ,
Dec 17, 2009 Dec 17, 2009

Copy link to clipboard

Copied

In order to use SQL, you should know something about database design. Do a Google search for something like "how to design a database."

Votes

Translate

Report

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