Hello,
I was wondering if anyone can gude e about a puzzle i am trying to create and think let me know if this is possible or not.
Well there are many users stored i.e admins what if by mistake there is only 1 admin left in the database and that admin is logged in already i want to make that the admin which is currently logged in cannot delete him self or by mistake he click on delete button it says all admins deletation are not valid it should remain atleast 1 admin in the database we cannot delete all
as by seeing my database there are 1 table named agents and in that theere are stored users and admins both so 1 user type is admin and secon is agent so obviously there should be 1 admin remains ie all cannot be deleted if somebody delete all admins bby mistake thatn how can he manage the cms
Please give me any idea or guidline how it can be done well I am trying my self as well if i Come up with this i will foresure share it.
Thank You