OK. Understood.
Your issue came because you're executing an SQL statement that doesn't exist.
This is your code. Where are you defining the SQL to follow? Remember you're inside a function.
function jobnbr_inserts(& $sender) {
$sqla = "INSERT INTO tbl_1(jobnbr) VALUES($jobnbr)";
$db->query($sqla);
}
You're using $db wich isn't defined, which doesn't "exist". You need to always call your connection when you're on custom code.
To work try this:
function jobnbr_inserts(& $sender) {
$db = new clsDB<your_db_connection>
$sqla = "INSERT INTO tbl_1(jobnbr) VALUES($jobnbr)";
$db->query($sqla);
}
Also you can call it in this way:
function jobnbr_inserts(& $sender) {
global <your_db_connection>
$sqla = "INSERT INTO tbl_1(jobnbr) VALUES($jobnbr)";
$db->query($sqla);
}
Happy coding
Melvyn