Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database Error 1452: unable to insert a new work order
05-31-2022, 07:03 AM, (This post was last modified: 05-31-2022, 09:01 AM by TurboPT.)
#6
RE: Database Error 1452: unable to insert a new work order
I found that message is actually at 2 places in the DeliveryDetails file, so line 504 may not be the only place that can be the trouble.

Do you mind adding a couple of echo's to check?
If you might not have any local file modifications, I can attach a file with debug added, if that might be more desirable.

Anyway, add this before the query at line 499:
PHP Code:
echo __FILE__':'__LINE__" => wo: $WONo, loccode: {$_SESSION['DefaultFactoryLocation']}, end."

Add this before the query at line 697:
PHP Code:
echo __FILE__':'__LINE__" => wo: $WONo, loccode: {$_SESSION['Items'.$identifier]->Location}, end."


Then save, reproduce the error, to see what output displays on the page.

Also, check the loccode at the table level to ensure that it does not possibly have any leading/trailing white space that could cause a mismatch.
Can use this query, but replace the zzz portion with the known loccode:
Code:
SELECT loccode, length(loccode) FROM locations WHERE loccode like '%zzz%';
Reply


Messages In This Thread
RE: Database Error 1452: unable to insert a new work order - by TurboPT - 05-31-2022, 07:03 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)