ATTENTION EVERYBODY IT IS NECESSARY TO TURN OFF THE TRASH IF YOU OR USERS ARE DELETING OLD LISTINGS. I have done many tests, the problem is with trash box only. When trash is turned off all the deleting functions are working good without leaving any files or sql traces. Even Viktor's code is working perfectly when the trash is disabled.