karimali831 Posted August 17, 2010 Share Posted August 17, 2010 Hi, I need a simple command to delete all rows where userID = 2567 I had a shot but didn't work: DELETE FROM * WHERE userID='2567' || usgID='2567' My website is spammed by this user so I want to delete all records by this userID in my database. Hope someone can help and thanks! Link to comment https://forums.phpfreaks.com/topic/211001-delete-from-all/ Share on other sites More sharing options...
PFMaBiSmAd Posted August 17, 2010 Share Posted August 17, 2010 You must specifically list which table(s) you want to delete from. There is no wildcard table reference because if the database user happened to have high enough privileges, applying a query using a wildcard table reference could easily destroy your database structure and users. Link to comment https://forums.phpfreaks.com/topic/211001-delete-from-all/#findComment-1100510 Share on other sites More sharing options...
emilcarlo Posted August 18, 2010 Share Posted August 18, 2010 DELETE FROM tablename WHERE userID='2567' || usgID='2567' Link to comment https://forums.phpfreaks.com/topic/211001-delete-from-all/#findComment-1100874 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.