I have this code:
$get_season_end_time = $db->query("SELECT `end_times` FROM `seasons` ORDER BY `ID` DESC LIMIT 1")->fetch_assoc();
if (time() > $get_season_end_time['end_times']) {
$db->query("UPDATE `seasons` SET active='-1', ended='1' ORDER BY `ID` DESC LIMIT 1");
}
For some reason, the ended
column is updating, but the active
dosen't.
Any suggestions? thx!
Try to set type of column active to DECIMAL
Standard SQL requires that DECIMAL(5,2) be able to store any value with five digits and two decimals, so values that can be stored in the salary column range from -999.99 to 999.99
I didn't realize it, but I had a bug updating the active
column to 1
at the end of the script. I didn't try manualy change the value of the active
column.
Really sorry for the truble!