SELECT * FROM userSessions WHERE id=123;
4. If that shows you just the rows you'd expect then convert it to the delete from of the SQL (making sure that you don't change any part of the WHERE clause) DELETE FROM userSessions WHERE id=123;
5. Get someone else, who also understands the database, to check your SQL
Or to put it another way, if you push everything into the AI, then you going to become entirely dependent on those people who can keep the AIs running...