omg..You can't ban people like that. You need to ban them from the control panel.
In general, if you run queries on the database, you run the risk of putting your system in an unknown and inconsistent state, leading to more/other problems down the line.
We use essential cookies to make this site work, and optional cookies to enhance your experience.