I have a very simple UPDATE command that I am attempting to execute but keep receiving a HTTP 500 internal server error.
$test = $mysqli->prepare('UPDATE `tname` SET column = ? WHERE `ID` = ?');
$test->bind_param('ii', $value, $id);
$test->execute();
I have been searching for the solution for the past few days to no avail.
The $mysqli object has been created and is NOT closed until after the above code is executed. This is confirmed by the fact that if I change the prepare statement to 'SELECT' or anything else besides 'UPDATE', it works successfully.
$value
and $id
are not null; if I echo them, the values are correct.
Strangely, this worked fine in my local environment and on Hostmonster before migrating to AWS. Might there be some setting I need to change? I wasn't able to find anything, and the problem seems to only be with calls that involve UPDATE
.