close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Multiple Update on page load

Thread began 2/11/2020 9:52 am by danielsebas | Last modified 2/12/2020 10:15 am by Ray Borduin | 325 views | 3 replies |

danielsebas

Multiple Update on page load

Hi Ray, I applied the multiple update behavior in a page with on load trigger, but is not working. I had to change the trigger to page submit and ad onLoad="document.form1.submit()" to the body tag. I'm attaching the page.
Thank you for your help.

Attached Files
update1.php
Sign in to reply to this post

Ray BorduinWebAssist

You don't need to use a multiple update server behavior. Use a regular MySQLi Update server behavior. You only need multiple update if you are updating based on a form submit where each value might be changed individually.

You would just have to manually add a second ->addFilter() call to the code to filter on more than one column when doing the update.

Sign in to reply to this post
Did this help? Tips are appreciated...

danielsebas

Hi Ray, I'm using the multiple update because I want to update the values of a table column with the auto increment id column.

This is what I did:
I made a page that has a multiple file upload behavior. This page, after the update, you are supposed to arrange the pictures by dragging them so it has also a drag and drop behavior. This drag and drop behavior needs an order column in the database with unique values, but when I upload multiple pictures the order column is inserted with the same values, so I placed the multiple update behavior in another page so as soon as I upload the pictures, the order column is updated copying the auto increment column values.

Sign in to reply to this post

Ray BorduinWebAssist

I think you can do that with a simple update statement using the "MySQLi Execute Query" server behavior like:

UPDATE fotos SET fotosORD = fotosID WHERE fotos.fotosSUBCATID = col_cat AND fotos.fotosORD = col_orden

and use parameters for col_cat and col_orden mimicking the recordset you have currently.

Sign in to reply to this post
Did this help? Tips are appreciated...

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