close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Update Multiple Records not updating....

Thread began 2/21/2012 5:11 am by Rune Brynestad | Last modified 2/22/2012 2:08 pm by Jason Byrnes | 715 views | 7 replies |

Rune Brynestad

Update Multiple Records not updating....

Not sure whats going on here. Trying a simple test prior to trying to use on website.
Very basic multiple update not working at all. There is no error messages, just no updates.

I'm attaching my file. Appreciate your analysis.

Regards
Rune

Attached Files
vurdering.zip
Sign in to reply to this post

Jason ByrnesWebAssist

to help troubleshoot the problem, add the following code just before the </body> tag and post back the output from this:

php:
<?php

echo("region: ".$_SESSION['Region']."<br />");
echo(
"SQL: ".$WA_Sql."<br />");
echo(
"<pre>");
var_dump($_POST);
echo(
"</pre>");
?>
Sign in to reply to this post

Rune Brynestad

It goes like this for the first 6 records:

region: 7
SQL:
array(124) {
["WADA_RepeatID_Id_0"]=>
string(4) "1523"
["Prioritet_0"]=>
string(1) "1"
["WADA_RepeatID_Id_2"]=>
string(4) "1522"
["Prioritet_2"]=>
string(1) "2"
["WADA_RepeatID_Id_4"]=>
string(4) "1521"
["Prioritet_4"]=>
string(1) "3"
["WADA_RepeatID_Id_6"]=>
string(4) "1520"
["Prioritet_6"]=>
string(1) "4"
["WADA_RepeatID_Id_8"]=>
string(4) "1519"
["Prioritet_8"]=>
string(0) ""
["WADA_RepeatID_Id_10"]=>
string(4) "1517"
["Prioritet_10"]=>
string(0) ""

I have updeted the first 4

Regards
Rune

Sign in to reply to this post

Jason ByrnesWebAssist

at line 7 you have the following if statement:
if ("".$_SESSION['Region'] ."" < "7") { // WebAssist Show If

that if statement is closed at line 180:

} // ("".$_SESSION['Region'] ."" < "7")



the code for the update record behavior is at lines 136 - 178, inside of that if statement.

the fact that the region session variable is 7 is causing the if to fail and the update to be ignored.

Sign in to reply to this post

Rune Brynestad

Ok.

I have moved the closed if statement to line 135. The first record (the record with id 1523) is updated as it should be, the other records are not. The output is now:

region: 7
SQL: UPDATE `gavesoknader` SET `Prioritering` = '5' WHERE `Id`=1523
array(124) {
["WADA_RepeatID_Id_0"]=>
string(4) "1523"
["Prioritet_0"]=>
string(1) "5"
["WADA_RepeatID_Id_2"]=>
string(4) "1522"
["Prioritet_2"]=>
string(1) "6"
["WADA_RepeatID_Id_4"]=>
string(4) "1521"
["Prioritet_4"]=>
string(1) "7"
["WADA_RepeatID_Id_6"]=>
string(4) "1520"
["Prioritet_6"]=>
string(0) ""
["WADA_RepeatID_Id_8"]=>
string(4) "1519"
["Prioritet_8"]=>
string(0) ""
["WADA_RepeatID_Id_10"]=>
string(4) "1517"
["Prioritet_10"]=>
string(0) ""

I'm attching my updated file.

Regards
Rune

Attached Files
vurdering.zip
Sign in to reply to this post

Jason ByrnesWebAssist

move the echo for the sql so that it is just after the update command line.

change:

php:
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());



to:

php:
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
echo("SQL: ".$WA_Sql."<br />");
Sign in to reply to this post

Rune Brynestad

No difference I'm afraid. Only the first record is updated. The output is the same as before.

I'm attaching the updated file.

Regards
Rune

Attached Files
vurdering.zip
Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

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