close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Multiple record update not updating database

Thread began 3/19/2020 11:39 am by Jay Core Global Media | Last modified 3/19/2020 4:25 pm by Ray Borduin | 450 views | 4 replies |

Jay Core Global Media

Multiple record update not updating database

I have recently purchased the new databridge am trying update a settings form on a settings page. Am not sure if I have set it up correctly, form submits however does not update.

Sign in to reply to this post

Ray BorduinWebAssist

It looks like you have a dynamically named index field:

php:
<input id="<?php echo($SiteSettings->getColumnVal("SettingsID")); ?>" name="<?php echo($SiteSettings->getColumnVal("SettingsName")); ?>" type="<?php echo($SiteSettings->getColumnVal("SettingsType")); ?>" value="<?php echo($WAGlobals->getColumnVal("SettingsValue")); ?>" class="form-control control-group" tabindex="<?php echo($SiteSettings->getColumnVal("SettingsWeight")); ?>" title="Please enter a value." required="true">


It shouldn't be... it should just be:

php:
<input id="setting_<?php echo($wa_startindex); ?>" name="setting_<?php echo($wa_startindex); ?>" type="text" value="<?php echo($WAGlobals->getColumnVal("SettingsValue")); ?>" class="form-control control-group" title="Please enter a value." required="true">



Then you don't have a binding set to update that column. You would need to update the code above from:

php:
$UpdateQuery->Table = $MultipleUpdateTable;

    $UpdateQuery->addFilter($MultipleUpdateIndexColumn, "=", $MultipleUpdateIndexColumnType, $_POST[$MultipleUpdateIdentifier."_".$MultipleUpdateCount]);


to:

php:
$UpdateQuery->Table = $MultipleUpdateTable;

    $UpdateQuery->bindColumn("SettingsValue", "s", "".((isset($_POST["setting"."_".$MultipleUpdateCount]))?$_POST["setting"."_".$MultipleUpdateCount]:"")  ."", "WA_BLANK");
    $UpdateQuery->addFilter($MultipleUpdateIndexColumn, "=", $MultipleUpdateIndexColumnType, $_POST[$MultipleUpdateIdentifier."_".$MultipleUpdateCount]);
Sign in to reply to this post
Did this help? Tips are appreciated...

Jay Core Global Media

Hi Ray I made those changes however it is still not working

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

Ray BorduinWebAssist

This looks like it would work to me. I'd have to debug it live. Can I get a url with login information to test and FTP access? Otherwise I could help you debug it in a screen sharing session.

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

Jay Core Global Media

I figured it out Ray, I ran the multiple update again with the form corrected removing what you suggested. I appreciate the help as always.

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