I am using Zend Framework 1.10.8 and MySQL Server 5.1.X. I create my data array to update the record but only one field updates.
<?php
$where = "`character_id` = '5'";
$healthGained = 5;
$data = array();
if ($healthGained > 0) {
$data['character_current_health'] = $character['character_max_health'] + $healthGained;
$data['character_max_health'] = $character['character_max_health'] + $healthGained;
print_r($data);
$characterInfoTable->update($data, $where);
}
?>
What I get from the print_r is this:
Array ( [character_current_health] => 430 [character_max_health] => 430 )
However the value of character_current_health does not change in the database. The value of character_max_health does however. Anyone know what is going on with this?
NOTE: The fields are named correctly and are the correct data type. This is running on a Linux server running Ubuntu.