close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

multiple update

Thread began 1/04/2019 7:19 am by Sweens | Last modified 1/03/2020 10:37 am by Ray Borduin | 1493 views | 16 replies |

Sweens

multiple update

Hi Ray

I continue to have problems updating from mysql to mysqli multiple updates. I have reinstalled DA to ensure it's the current version, but no difference.

The repeat region displays the records properly, but I get the following error after pressing the update button.

Fatal error: Uncaught Error: Call to undefined function mysql_select_db() in /home/sites/sweens.uk/public_html/admin/modals/modal-mainpages-sort.php:65 Stack trace: #0 {main} thrown in /home/sites/sweens.uk/public_html/admin/modals/modal-mainpages-sort.php on line 65

Page attached.

When applying the multiple update, the following line was added, which I think is wrong, as it relates to the field being updated, not to the id of the record

<input type="hidden" name="sOrder_wamultihidden_<?php echo $RepeatSelectionCounter_1; ?>" id="sOrder_wamultihidden_<?php echo $RepeatSelectionCounter_1; ?>" value="1" />

The correct value should be, I think,

<input type="hidden" name="WADA_RepeatID_pg_id_<?php echo $RepeatSelectionCounter_1; ?>" id="WADA_RepeatID_pg_id_<?php echo $RepeatSelectionCounter_1; ?>" value="<?php echo($rsPages->getColumnVal("pg_id")); ?>" />

(I've tried it with both values, and neither work).

I'm using PHP v 7.2, if that's relevant

Many thanks
Chris

Sign in to reply to this post

Ray BorduinWebAssist

This page has the MySQL version of the Multiple Update server behavior, not the MySQLi version. Open it up from the server behaviors window and reapply it with the MySQLi connection selected and the code should be updated automatically... assuming you have Databridge v2 installed.

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

Sweens

Thanks Ray

I think it might be my misunderstanding of the extension; I have the mysqli server extension pack, which I thought was now unnecessary as the facilities are now available in DataAssist - so I used the 'repeat selection' and 'multiple update' links from the webassists|DataAssist menu

I've reapplied everything, using the links from the webassist|MySQLi

I now get the following error:

Fatal error: Uncaught Error: Class 'WA_MySQLi_Query' not found in /home/sites/sweens.uk/public_html/admin/modals/modal-mainpages-sort.php:16 Stack trace: #0 {main} thrown in /home/sites/sweens.uk/public_html/admin/modals/modal-mainpages-sort.php on line 16

Updated page attached.

Thanks

Chris

Sign in to reply to this post

Sweens

I have sussed it!

The update beahaviour was inserted before the line

<?php require_once('../../webassist/mysqli/queryobj.php'); ?>

I moved this line above, and it now works properly.

Hope this helps for any future updates.

Cheers
Chris

Sign in to reply to this post

Sweens

Hi Ray

Similar problems on another page, despite rebuilding it several times. I get the following error after trying to update multiple records

.../adminsection/members/committee-pages_Slideshow47.php on line 128
<

Thanks
Chris

Sign in to reply to this post

Ray BorduinWebAssist

It looks like you have a standard MySQL multiple update server behavior instead of the MySQLi version. It appears your connection is MySQLi, so the multiple update should be the MySQLi version of the server behavior.

If you gave me FTP access and a URL with steps to reproduce the issue then I could debug further and help you get it fixed.

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

Sweens

Thanks Ray

I've applied the mysql_i version (I thought it would do this automatically on updating everything else - my bad!). Now I get

Fatal error: Call to a member function getColumnVal() on a non-object in /home/rotaryribi/public_html/adminsection/members/committee-pages_Slideshow47.php on line 15

line 15 is the redirect location:

$MultipleUpdateRedirect = "committee-pages_Slideshow.php?CtteeID=".$rsCtteePages->getColumnVal("ClubCtteeID") ."&PgID=".$rsPg->getColumnVal("PgID") ."";

Is the syntax wrong?

Unfortunately, I can't give you to access to this site.

Thanks

Chris

Sign in to reply to this post

Ray BorduinWebAssist

It looks like the update code may have been placed higher on the page than the Recordset you refer to on that line... you probably just have to move it lower with copy/paste.

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

Sweens

Thanks Ray - that was the case; no error on pressing update - but no recirds are updated!

Latest version attached.
Thanks

Cgris

Attached Files
committee-pages_Slideshow47.php
Sign in to reply to this post

Ray BorduinWebAssist

It looks like it left behind the old syntax for naming form elements. Do a find and replace

search for: $RepeatSelectionCounter_1
replace with: $wa_repeatcount

The repeated variable name changed in MySQLi

Sign in to reply to this post
Did this help? Tips are appreciated...
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...