A quick example of a SQL statement with REPLACE $query = 'SELECT id FROM `user` WHERE email ="'.$email.'" AND REPLACE(tel_1, " ","") = "'.$phone.'" LIMIT 1'; Main Category MySQL Secondary Categories PHP