close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Multiple update glitch

Thread began 6/12/2015 12:29 pm by iain331081 | Last modified 6/12/2015 10:03 pm by Ray Borduin | 1053 views | 7 replies |

iain331081

Multiple update glitch

I think this one is mostly working. When you tick the tick box for lots of records, it updates correctly.

However, the record should probably show the tick box as ticked if it has been followed, and remain untucked if it has not.

I have attached a copy of the page and posted a link below.

Thank you.

Sign in to reply to this post

Ray BorduinWebAssist

You would have to add a recordset to get the previously selected options from the database and then loop through that to get an array of values and select checkboxes based on whether the value is in the array or not.

If you used "manage relational table" instead of "multiple insert" the server behavior should do all that for you.

Sign in to reply to this post

iain331081

Thanks Ray - I thought I already had a recordset:

SELECT DISTINCT LodgeID, Lodge, GSG_URL, banner_image_new, Country, banner_image_new_title, photo_one, photo_one_title, Summary_2013, lodges.CountryID, UserIDIT FROM lodges INNER JOIN countries ON lodges.CountryID = countries.CountryID INNER JOIN product_users ON lodges.LodgeID = product_users.LodgeIDIT WHERE Product_Type = 'Property' AND UserIDIT <> '' GROUP BY LodgeID

And the loop, which is displaying all the records with the tick boxes.

Or do I need a second one to control whether or not the tick boxes show as ticked?

Where do I use 'manage relational table' instead of 'multiple insert'?

Sign in to reply to this post

Ray BorduinWebAssist

You would need a second recordset to only return rows that have inserted values.

You could delete the multiple insert server behavior and apply the manage relational table server behavior in its place.

Sign in to reply to this post

iain331081

So one recordset to list all the products, and a second one to determine which of the products have the tick box ticked?

Looking at that now though - I assume the Foreign Key column would be LodgeIDPL, but not so sure about the Key Value?

Sign in to reply to this post

Ray BorduinWebAssist

Yes that is correct. The second recordset could do a SELECT FROM the inserted table so that it only returns records that have been inserted based on the checkboxes previously.

Manage relational table does a Delete of the old records, Insert of the new ones, and returns an array of the previously selected ones all at once to allow the page to act as both an insert/update and display previously selected values without having to create the second recordset.

Sign in to reply to this post

iain331081

Sorry - last question - looking at the manage relational table behaviour, it looks like it should have two tables with an interlinking table.

In this structure there is just the main table, and the related table.

ie

table_lodges

LodgeID
Lodge
etc

and table_lodge_likes

LikeID
LodgeID

Where the link would just be between the LodgeID (PK) in the lodges table and the LodgeID (FK) in the lodge)likes table.

Should that still work?

Its 1am here, so time for bed - so thanks in advance for answering these questions Ray, and have a good weekend.

Sign in to reply to this post

Ray BorduinWebAssist

I don't think the third table is really necessary in the Server Behavior. It think it only really asks for columns from the first two, so it should still work.

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