$a – $b = $a

I do this thing

$res = mysql_query("UPDATE `startpoke` SET life='life - 3' WHERE id_poke='".$_SESSION['id']."'")or die(mysql_error()) ;

This means that it should subtract 3 from the initial level of lives 12, but instead it writes life – 3 in the column, please tell me what to do =)


Answer 1, authority 100%

$res = mysql_query("UPDATE `startpoke` SET `life`=`life`-3 WHERE id_poke='".$_SESSION['id']."'")or die(mysql_error()) ;