close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

DataAssist insert page - insert/update two tables at once?

Thread began 2/25/2010 10:30 am by jeffmg279672 | Last modified 3/01/2010 2:55 pm by Dani Chankhour | 905 views | 5 replies |

jeffmg279672

DataAssist insert page - insert/update two tables at once?

I have two tables and rather than set up a separate insert/update/delete page for each of them, wondered if it's possible to set up a single page for each function that will (on Insert/Update being pressed) update the two tables simultaneously, or whether there isn't a shortcut here.
If it's possible and there's documentation on it somewhere I'd appreciate a pointer in that direction.

Also - unlike some who post on here I don't have anything but good things to say about the standard/response time of support from WA - I've been bailed out by you more times than I can remember, and always with unfailing courtesy and patience. Thanks a lot.

Sign in to reply to this post

Dani Chankhour

Thanks for your comments.

Yes, you can just apply additional insert, delete, and update DataAssist server behaviors to the same page. The only thing you need to watch out for, is make sure that you don't have any redirect setup till the last server behavior is ran.

Sign in to reply to this post

jeffmg279672

Thanks for that Dani - I'd wondered about trying to create a second insert immediately below the first one - at the end of the code for the first insert page comes this:

if ($WA_redirectURL != "") {
if ($WA_keepQueryString && $WA_redirectURL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "" && sizeof($_POST) > 0) {
$WA_redirectURL .= ((strpos($WA_redirectURL, '?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
}
header("Location: ".$WA_redirectURL);
}
}

So if I read you correctly, should I insert the second insert behaviour before this section?

I wasn't sure whether to try running the wizard a second time on the same page, or setting up a separate page to do the second insert then copying and pasting the code from this immediately below the first one (if you see what I mean).

Sign in to reply to this post

Dani Chankhour

It really does not matter which insert server behavior comes first or last, you can just add the server behavior to the same page. Just make sure that the last server behavior on the page is the one that have a redirect to a separate page if you do have a redirect otherwise you should have to worry about which order to have the inserts.

Sign in to reply to this post

jeffmg279672

The attachment contains two insert pages which are designed to create new listings on two linked db tables. I'd like to combine them on one page but I'm not sure how to do it as each redirects to a different page. I'm not clear whether I can copy and paste the WADAInsertContainer from one page into the other and delete one of the redirects, or whether I need to do something more complicated than that. Any guidance appreciated.

Attached Files
Archive.zip
Sign in to reply to this post

Dani Chankhour

Yes, you should be able to just copy and past the insert server behavior from one page to another and place it under the first insert server behavior and just make sure to remove the redirect from the first insert server behavior to the second.

I also noticed that you have applied Digital File Pro server behaviors, so just make sure that you copy that. And as long as all the includes files are there the server behavior should work. And it looks you are using the same trigger name, so that should be fine.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...