what is wrong with this code?
$core->query("UPDATE games SET hits = hits + 1 WHERE id=".intval($id).";");
hits
incerements by 2 and sometimes by 3! I mean for example hits = 3; when I call this function, hits will be 5 and sometimes 6! (add 2 and 3 instead 1).
mysql table type is MyISAM.
query function is:
function query($query) {
$this->error="";
$this->result=@$this->link->query($query);
if(!$this->result) {
$this->error=@$this->link->error;
return FALSE;
}
return $this->result;
}
link is:
$link = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);