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

Inserting / Updating two tables at once - with one table potentially requiring multiple inserts / updates - best way to acheive?

Thread began 9/09/2014 11:47 am by Nathon Jones Web Design | Last modified 10/03/2014 12:31 pm by Jason Byrnes | 973 views | 11 replies |

Nathon Jones Web Design

Inserting / Updating two tables at once - with one table potentially requiring multiple inserts / updates - best way to acheive?

I have an Events table, an Artists table and an EventsArtists table. I would like to have Insert & Update forms that allow me, for the Insert, to add a new event to the Events table and, from a multiple choice drop-down, add artists that will be performing at that event to the EventsArtists table. The Update form would obviously need to do the same but would be editing existing entries.

Is this best achieved by having two separate Insert forms...one that creates the new event, and therefore gives us a unique ID to work with, and THEN a separate form for associating artists to the newly created event?

Would appreciate your advice, support and guidance. Thank you.
NJ

Sign in to reply to this post

Jason ByrnesWebAssist

See the manage relational table tutorial:
http://www.webassist.com/tutorials/Manage-relational-tables

Sign in to reply to this post

Nathon Jones Web Design

Thank you Jason. I will have a run through that.

I do need the EventsArtists table though, right? Basically a link table (I'm sure there is terminology for this that I'm missing!) that links the eventID with the artistID's.

Thank you
NJ

Sign in to reply to this post

Jason ByrnesWebAssist

Yes you nee the linking table, go through the tutorial, it is pretty much exactly what you are trying to accomplish with the exception of using checkboxes instead of a multiple select list.

Sign in to reply to this post

Nathon Jones Web Design

Got to Step 6 in the 'Add genres to the Insert Page' section of the tutorial you've advised above (http://www.webassist.com/tutorials/Manage-relational-tables). Step 6: Apply 'Insert Multiple Records' to the genre checkboxes.

The first step is:
1. From the Behaviors window, select WebAssist > DataAssist > Insert > Multiple Record Inserts.

However, when I do this I receive the following error:
"Your page must contain form elements in a repeated region to use this interface."

Is this a problem because we're using MySQLi (as advised)? Is the tutorial you've advised therefore redundant?
If so, how do we achieve what we're trying to achieve?

Thank you.
NJ

Sign in to reply to this post

Jason ByrnesWebAssist

You wont be able to use MySQLi for this, you have to use Data Bridge which has not yet been upgraded to be compatible with MySQLi. We are still working on that upgrade.

You will need to use standard MySQL recordsets and repeat regions for this page.

Sign in to reply to this post

Nathon Jones Web Design

Am I going to have to build this twice? :(

I'm hugely disappointed by this Jason. I've taken WebAssist's advice on this matter in good faith...

"With MySQL deprecated, it's important to begin using MySQLi - the improved, streamlined version of MySQL - now so your websites will continue to work when the next version of PHP is released."

I purchased the MySQLi extension some time ago as your marketing made it clear that this was "important" and that there was the potential for my websites to stop working. Your marketing also made it clear that it was important to do this "now".

What I seem to be hearing from you now is that you haven't, yet, brought other closely related products up-to-speed with the MySQLi extension release, months on, so we're left with only limited functionality and in a position where, if we want particular functionality, we're going to have to build things twice - firstly with the old extensions because you haven't provided an alternative but that will stop working when the new version of PHP is released and secondly when you release the new extension so that it will work when the new version of PHP is released.

You are doubling our workload! :(

What is the timescale for release of the upgrade to Data Bridge as it has been months since the MySQLi extension was released?
Shouldn't this be prioritised over webinars about Recurring Payments etc?

Thank you.
NJ

Sign in to reply to this post

Jason ByrnesWebAssist

The Migration to MySQLi is a multi step process.

The native Dreamweaver Server behaviors where the platform that we used for building our extensions. To begin porting the extensions to MySQLi, the first step needed to be to recreate the native server behaviors.

Now we are working on adding MySQLi support to our other extensions. eCart was the first to be completed, and we will be upgrading design Extender and Data Bridge as well.

As for having to recreate pages, the simple answer is: We don't know yet. Ray has made mention of creating a migration tool, but I don't know what the scope of that will be as it is not yet finished.

I Dont have a time frame for when the other extensions will be released for MySQLi support, but announcements will be made when they are.

Sign in to reply to this post

Nathon Jones Web Design

We purchased the MySQLi extension because you led us to believe that it was "important" and that we should do it "now" so that our "...websites will continue to work when the next version of PHP is released". All very powerful wording wouldn't you agree? (please see http://www.webassist.com/product/mysqli)

You are now telling us that months on - the latest release of MySQLi extension was July so it has been on the table for some months now - there is no time frame for when the other extensions will be released for MySQLi support.

So, we are left having to scrap the MySQLi work we've done up to now and revert back to using extensions that generate code that you've informed us won't work when the next version of PHP is released.

Seriously?

Sign in to reply to this post

Jason ByrnesWebAssist

Nathan, it is a transition period.

It is important to start using the MySQLi extensions whenever possible. That doesn't mean that you will be able to do everything with MySQli though.

For some things, you will need to revert back to using standard MySQL.

I'm not suggesting that you scrap the work you have done with MySQLi on other pages, I'm only saying that for this particular page where you need to use the Manage relational table behavior, you will need to use the standard MySQL behaviors.

The time frame for when MySQL will no longer be supported is still some way off. That will happen when PHP 6 is released, and your hosting company installs it to your server. even when that happens, most hosting companies give you the option to continue using the previous php version. I work with 1 and 1 and they offer the option of using php 4, or php 5.

Sign in to reply to this post
loading

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...