debugging mysqli insert query
i have a site which has been working fine until recently, but some errors are coming to light after the host updated to a newer version of mySQL
one issue I have encountered is an insert query, which populates a table if certain criteria are met, however I am unable to check the insert statement.
here is my code
<?php
if (isset($_POST["Create"]) && isset($campaignid)) {
$new_invitees = array_diff($_SESSION['memberidsinmailing'],$already_invited);
//compare the 2 arrays, and return the member id's who are in the campaign send list, but have not already received an invitation
//the members already sent will get another email, but they will not get a new entry in the tbleventmember table
foreach ($new_invitees as $invitedmember) {
$InsertQuery = new WA_MySQLi_Query($PowerCMSConnection_i);
$InsertQuery->Action = "insert";
$InsertQuery->Table = "tbleventmember";
$InsertQuery->bindColumn("EventID", "i", "".isset($_GET['EventID'])?$_GET['EventID']:''."", "WA_DEFAULT");
$InsertQuery->bindColumn("MemberID", "i", "".$invitedmember."", "WA_DEFAULT");
$InsertQuery->bindColumn("InviteSent", "i", "0", "WA_DEFAULT");
$InsertQuery->bindColumn("CampaignID", "s", "".$campaignid."", "WA_DEFAULT");
$InsertQuery->saveInSession("eventmember");
$InsertQuery->execute();
$InsertGoTo = "";
if (function_exists("rel2abs")) $InsertGoTo = $InsertGoTo?rel2abs($InsertGoTo,dirname(__FILE__)):"";
$InsertQuery->redirect($InsertGoTo);
}
}
?>
in order to try and debug, i added some statement on $_POST["Create"]
echo $InsertQuery->debugSQL();
but the page returns an error
Fatal error: Call to a member function debugSQL() on null
if i run the debugSQL() function on a recordset from a SELECT statement with a which is also on the page, i get the expected output.
I have set $this->Debug = true; in both rsobj.php (version 2.18) and queryobj.php (version 1.5)