The second query isn’t actually setting the buststreak column to anything, so, as shown, this never worked. If the buststreak column is getting changed, it’s not due to that query.
You shouldn’t update a column in a table to keep track of changes in a value. as this doesn’t provide an audit trail that would let you detect if a programming mistake, a duplicate form submission, or nefarious activity changed a value. You should instead insert a new row in a related/child table for every transaction that affects a value. Doing this will also let you easily determine if there is a streak of x events.
I reviewed your previous threads on the forum, mainly to see if they provided some insight as to what you are trying to do in this thread, since a tail-end snippet of code doesn’t really help us to help you with why something on your page doesn’t work.
I/we are not are not trying to give you a hard time or needlessly cause you more work through the suggestions that have been made. The suggestions have been to produce code that’s -
- Secure. It also turns out that using a prepared query, with the PDO extension, simplifies the php code and simplifies the sql query syntax.
- Provides a good User eXperience (UX.) The user will know what they should do and if something they did caused an error that they can correct by resubmitting data.
- Simple, general purpose, and reusable. The code you have shown is filled with a wall of unnecessary things that don’t add any value and have ignored the suggestions that have been made, so that we are repeating the same suggestions over and over.
- Will either work or it will tell you (display/log) the reason why it won’t.