Closed Tecfan closed 4 years ago
This appears to be the cause of the bug https://www.php.net/manual/en/mysqli.affected-rows.php#102523
+1: a row was inserted +2: a row was updated
previously: items_tagged += affected_rows currently: if(affected_rows > 0){ items_items += 1 }
upon update of tag
It looks to be fixed although it is likely that I used ON DUPLICATE KEY UPDATE and += affected_rows in other areas of the site.
Describe the bug
When you update the tags on your games in your tradable list and press "Tag", a message appears on the top of the page. For example, if you add "userfield" to a game, with an integer tag value of "10", it will show you this message: "Updated 1 item tagged".
If you then were to update the integer tag value from "10" to "15", still only having this one item selected, you will get the following message: "Updated 2 items tagged". This is wrong – only 1 item was tagged.
If you update the integer tag value of 5 items at the same time, it will then tell you that you updated 10 items (it doubles).
This is true for all trading tags when you use the integer tag value field. The "integer tag value" field can also be empty for the bug to appear. For example, if you add the tag "combined" with no integer value, and then update it to any number in a second action, you will still see "2 items tagged", when you only tagged 1 item.
See screenshot for more context. Only 1 item is selected, but the system claims that it updated 2 items.