This topic is locked

Event: ID not copied in new table

5/23/2016 11:32:20 PM
PHPRunner General questions
P
pinoyoutdoor author

I have a problem and I need all your help.
I have added in Events > After record added script (insert a record into another table), this my script



global $conn;

$strSQLInsert = "INSERT INTO my_log (`status`,`starttime`,`burid`,`entryby`)

VALUES ('".$values["status"]."','".$values["datesubmitted"]."','"$values["ID"]."','".$values["name"]."')";

db_exec($strSQLInsert,$conn);


the problem is the ID is not copied in my_log table all other fields are copied and no error displayed in the page. using phprunner8.1

C
copper21 5/27/2016



I have a problem and I need all your help.
I have added in Events > After record added script (insert a record into another table), this my script



global $conn;

$strSQLInsert = "INSERT INTO my_log (`status`,`starttime`,`burid`,`entryby`)

VALUES ('".$values["status"]."','".$values["datesubmitted"]."','"$values["ID"]."','".$values["name"]."')";

db_exec($strSQLInsert,$conn);


the problem is the ID is not copied in my_log table all other fields are copied and no error displayed in the page. using phprunner8.1


You are missing a period right before the $ on your ID values field....it should be '".$values["ID"]."'