1
Greetings,
I am writing my first package for xoops, or I should say re-writing it as I originally wrote a small tool using native PEAR:
B calls to read and write data to my DB. Now I am in the process of converting it to use xoopsDB calls instead. While the select statements are working correctly, the update statements are failing miserably.
I have the following SQL update statement
$sql = sprintf("UPDATE envStats SET envStatus=2,envChangedBy='%s' WHERE UID='%s'", $thisUser, $_GET['envUp']);
$xoopsDB->query($sql);
Once, and once only have I even seen this get to the MySQL server. Looking at various code throughout the XOOPS core, I see similar statements being used fairly often, and they appear to be working correctly, however, this one does not seem to get to the MySQL server.
To help troubleshoot this issue, I added;
print($sql ."
\n");
It printed out;
UPDATE EnvStats SET envStatus=2,envChangedBy='jwells' WHERE UID='5'
So at this point, I know it is creating the correct MySQL update command. I turned on SQL logging and watched it while I ran this script and saw multiple select statements, by XOOPS and my script and one update statement called by XOOPS to update xoops_session.
So my question is, how can I force XOOPS to send the update statement to MySQL?