20.11.2013, 10:46
Okay, I want to keep records of the last 5 people the person called, but I don't want useless rows in my database either.
I stumbled upon "Trigers" in MySQL, so is it possible to add a trigger AFTER "Insert" queries that would delete the oldest row(I keep the current timestamp when they are added).
Note: I know this is more MySQL related than Pawn, but I'm still posting this here to let people suggest other ways and etc.
I know I could just send a query AFTER the insert one, to count the rows and delete the last one, but I just want to know if my described way is possible.
I stumbled upon "Trigers" in MySQL, so is it possible to add a trigger AFTER "Insert" queries that would delete the oldest row(I keep the current timestamp when they are added).
Note: I know this is more MySQL related than Pawn, but I'm still posting this here to let people suggest other ways and etc.
I know I could just send a query AFTER the insert one, to count the rows and delete the last one, but I just want to know if my described way is possible.