How to handle MySQL deadlock situations on an application level? How to handle MySQL deadlock situations on an application level? php php