Can someone give me a quick hint on how I can achieve the following:
I have a table with 3 rows: id , value1 and user.
let’s say there’s 1 entry in the DB with the following data:
1, test, user1
Now when I submit my form and before the next thing gets actually inserted, I want to check the value of user of the last entry in the DB and change the next entry to either user1 (if the last one is user2) or user2 (if the last one is user1)
Edit:
I think I explained it a bit stupid.
Basically I want some kind of Zebra striping for the row user if that makes any more sense 🙂
It can be even easier:
Assuming that id is an AI field.
EDIT: adding some PHP code: