Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Not updating other records after server move

Questions related to using nuBuilder Forte.
Post Reply
ricklincs
Posts: 99
Joined: Mon Aug 01, 2011 5:39 pm
Has thanked: 28 times

Not updating other records after server move

Unread post by ricklincs »

I have a form pickhead with a subform pickitems. On as save I run the following:

Code: Select all

$sql = "UPDATE pickhead SET pickhead.status = 'INPROGRESS' WHERE pickhead_id = '#RECORD_ID#'";
nuRunQuery($sql);
$sql2 = "UPDATE pickitems INNER JOIN pickhead ON pickitems.pickhead_id = pickhead.pickhead_id SET pickitems.pick_date = pickhead.pick_date WHERE pickitems.pickhead_id = '#RECORD_ID#'";
nuRunQuery($sql2);
$sql3 = "UPDATE pickitems INNER JOIN pickhead ON pickitems.pickhead_id = pickhead.pickhead_id SET pickitems.pick_no = pickhead.pick_no WHERE pickitems.pickhead_id = '#RECORD_ID#'";
nuRunQuery($sql3);
$sql4 = "UPDATE pickitems INNER JOIN pickhead ON pickitems.pickhead_id = pickhead.pickhead_id SET pickitems.complete = pickhead.complete WHERE pickitems.pickhead_id = '#RECORD_ID#'";
nuRunQuery($sql4);
$sql5 = "UPDATE stkbody INNER JOIN pickitems ON stkbody.stkbody_id = pickitems.pstkbody_id SET stkbody.status = 'PICKED', stkbody.pick_date = pickitems.pick_date, stkbody.pick_no = pickitems.pick_no WHERE pickitems.pickhead_id = '#RECORD_ID#'";
nuRunQuery($sql5);
$sql7 = "UPDATE pickhead SET pickhead.status = 'OUT' WHERE pickhead_id = '#RECORD_ID#' AND pickhead.complete = 'COMPLETE'";
nuRunQuery($sql7);
this used to work and update pickhead, pickitems and stkbody, however now I have moved server it comes up with a gateway error and doesn't update stkbody. Php settings and verisons are the same, the only thing different is MariaDB has changed from 10.6.16 to 10.6.21 I have tried changing PHP-FPM settings as my host suggested. Anyone see this behaviour before?
kev1n
nuBuilder Team
Posts: 4242
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 68 times
Been thanked: 422 times
Contact:

Re: Not updating other records after server move

Unread post by kev1n »

Add nuDebug($sql) after the line nuRunQuery($sql), then inspect the output to check what the SQL looks like and whether the Hash Cookie is resolved.
Janusz
nuBuilder Team
Posts: 505
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 4 times
Been thanked: 18 times

Re: Not updating other records after server move

Unread post by Janusz »

Hi,
Except that - maybe on other form - can you add, modify or delete records?
What system are you using?
Anything in the nuDebug or ..apache2/error.log?

Normally with such simple sql I don't think it's a problem with MariaDB - I've never experienced a problem directly related to MariaDB. if you run the following directly in phpMyAdmin substituting any existing value for #RECORD_ID# - is it OK?

UPDATE pickhead SET pickhead.status = 'INPROGRESS' WHERE pickhead_id = '#RECORD_ID#'

(or use in phpmyadmin line generated directly from nuDebug($sql) )
If you like nuBuilder, please leave a review on SourceForge
ricklincs
Posts: 99
Joined: Mon Aug 01, 2011 5:39 pm
Has thanked: 28 times

Re: Not updating other records after server move

Unread post by ricklincs »

Hi Kev1n and Janusz, found the problem, for some reason when I moved the mariaDB over to the new host it changed the collation of one table to utf8mb3_unicode_ci, (table was stkbody which is my main subform) then any INNER JOIN statement didn't work. Fingers crossed all seems to be working fine now thank you. I asked chatgpt.com what could be happening and it gave me a list..
Post Reply