This topic is locked
[SOLVED]

Project build in 10.5 convert to 10.6 and not working anymore

9/7/2021 11:46:16 AM
PHPRunner General questions
I
Ivan van Oosterhout author

Hi
I have developped a program in 10.5 which works perfectly fine.
I convert my 10.5 project to the new 10.6 version and my inserts are not working anymore.

i do not see the problem and really don't get it anymore.
When i take back my 10.5 project and install this on the server, it works perfectly fine.
Doe somebody see something strange in this insert?

Mastertable: PreOrder
Detailtable: Orders

When you make an order in PreOrder and finished make 1 row in the Orders detail table.

PreOrder - After record added (This is the code)

$values["Bundling"] = $_SESSION["BUNDLING"];

if ($values["Bundling"] == "GORDIJN") {
$values["BundlingSide"] = '1';
$values["BundlingPostProcess"] = '1';
} else if ($values["Bundling"] == "BUNDEL") {
$values["BundlingSide"] = '1';
$values["BundlingPostProcess"] = '0';
} else {
$values["BundlingSide"] = '';
$values["BundlingPostProcess"] = '';
}

//=============================== Insert first white wire

$data = array();
$data["Customer"] = $_SESSION["ID"];
$data["JobKey"] = 01;
$data["PreOrder"] = $values["id"];
$data["Reference"] = $values["Reference"];
$data["ProjectName"] = $values["Projectname"];
$data["AmountSets"] = $values["AmountSets"];
$data["WireKey"] = "1";
$data["WireKey2"] = "H05V2-K 1.00 WH";
$data["WireColor"] = "WHITE";
$data["WireLength"] = "240";
$data["BundlingSide"] = $values["BundlingSide"];
$data["BundlingPostProcess"] = $values["BundlingPostProcess"];
$data["S1Pos1Text"] = $values["Reference"];
$data["S1Pos1Distance"] = "70";
$data["S1Pos1Turn"] = "1";
$data["S1Pos1Type"] = "NORMAL";
$data["S1Pos1Orientation"] = "FORWARDS";
$data["FontKey"] = "FONT_BLACK_0.75";
$data["S2Pos1Text"] = $values["Projectname"]."_1";
$data["S2Pos1Distance"] = "30";
$data["S2Pos1Turn"] = "1";
$data["S2Pos1Type"] = "NORMAL";
$data["S2Pos1Orientation"] = "FORWARDS";
$data["Teller"] = "1";
$data["mm2"] = "1";
$data["returnemail"] = $_SESSION["email"];
$data["multicol"] = $values["printcol"];
$data["Wiregroup"] = '1';
$data["Coderingen"] = $values["Coderingen"];
DB::Insert("Orders", $data );

//=============================== Insert into Orderlogging
$data = array();
$data["Customer"] = $_SESSION["ID"];
$data["Referentie"] = $_SESSION["REFERENCE"];
$data["Projectnaam"] = $_SESSION["PROJECTNAME"];
$data["Order"] = $values["id"];
$data["insert"] = now();
DB::Insert("Orderlogging", $data );
return true;

admin 9/7/2021

You need to perform all the basic troubleshooting steps i.e. make sure that this code is actually gets executed. This can be done by adding afew echo statements to this code or by utilizing xDebug extension as Fernando suggests:
https://asprunner.com/forums/topic/28497-Guide-22--Debugging-PHP-code-line-by-line

What I personaly see in this code - $values["id"] should be, most likely, $keys["id"].

I
Ivan van Oosterhout author 9/9/2021

Thank you sergey,

I will echo first, started of programming in live and not test environment due to the time.

Kind regards, Ivan