Cliffahoy Posted November 19, 2010 Share Posted November 19, 2010 Hi, what would I write in mysql database sql if I wanted to find a list of 50 email address from a list of 1000. Otherwords how would I find the list of 50 to delete them? The table is users and the field is email. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/219150-search-in-mysql/ Share on other sites More sharing options...
Pikachu2000 Posted November 19, 2010 Share Posted November 19, 2010 If the 50 you want to delete are in an array, you can use DELETE FROM . . . WHERE . . . IN() syntax. $query = "DELETE FROM `table` WHERE `email` IN( '" . implode("', '", $array_of_addresses) . "')"; Quote Link to comment https://forums.phpfreaks.com/topic/219150-search-in-mysql/#findComment-1136474 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.