I have this query and I get error "Operand should contain 1 column(s)", whats wrong in my query?
SELECT * FROM contact AS b WHERE b.id IN
(
SELECT *
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 ?
)
The IN operator expects a list of values which match whatever you are comparing against: the columnb.id in your case. So replace this
WHERE b.id IN (SELECT *
with this
WHERE b.id IN (SELECT id
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With