SELECT * FROM contact AS b WHERE b.id IN (SELECT e.Id FROM contact AS e WHERE e.firstname LIKE ? OR e.lastname LIKE ? OR e.email LIKE ? OR e.phone LIKE ? OR e.company LIKE ? OR e.profession LIKE ? OR e.mobile LIKE ?)
Instead of SELECT * FROM contact it should be a column that contains values corresponding to b.id
So this should be SELECT e.Id FROM contact
source share