1 votes

Query subtracts 2 instead of 1

Good day I am trying to execute a query where every time I run it I subtract 1 to an entire field of a table in MySQL by executing the pure query from phpmyadmin I subtract correctly 1 but when executing the url from localhost I subtract the amount of 2 someone knows why it will be? This is my query:

2voto

Triby Points 435

You're running the query twice:

Another option would be to use a variable to save the result of the query:

HolaDevs.com

HolaDevs is an online community of programmers and software lovers.
You can check other people responses or create a new question if you don't find a solution

Powered by:

X