Print screen: https://ibb.co/0cmf15N
Was trying to implement a previous ticket but i`m stuck in getting the right ticket details
For instance, if i have ticket number 3 open, i should get Previous ticket number 2. But if i`ll open ticket number 2, i should get in previous ticket: number 1. Problem is that i get the last ticket each time on the previous ticket section, instead to get the right one.
Any advise on the SQL query will be much appreciated.
Thank you!