I want to mass remove spam users from my forum's database.
If I have the UID of their account, what would be a good SQL query that I could script to delete that user and all their posts like the option in the ACP. SSH is much easier for me to login.
Deleting users directly from the database is asking for trouble as it will leave all sorts of remnants in tables other than the user table.
Your best bet if you know user names/id's is to use the 'Prune users' function in the ACP under the 'Users and groups' tab.