Field in MySQL is re-established only in all entries

0

More than a year ago I came across this problem for the first time, in a table that I have in my database where I have all the articles of my project, the value of one of the fields was reset to 0, the one of each and every ticket he had.

This field is not more than a visit counter, where each time the article is accessed it adds the value in a unit in this way:

$statement = $conexion->prepare('UPDATE art SET visitas = visitas + 1 WHERE id = :id');
$statement->execute([':id' => $id]);

This solution was obtained from a previous consultation . But the problem has happened again twice in the last month. The data type of this field in the database is int (11), I do not know if that could have something to do with it. The rest of the fields remain unchanged.

    
asked by JetLagFox 10.09.2018 в 08:58
source

0 answers