Inside a database i've got a table prospect and it has two posts firstname and lastname.

The problem is the fact that i wish to search both in posts the simple solution is always to make use of a query like

SELECT * FROM `prospect` WHERE lastname like '%piece of lastname%' or firstname like '%piece of firstname%'

Nevertheless this requires to possess two search fields, firstname and lastname. I would like that customers can search in a single area. How should a question seem like when I wish to accomplish this?

Would you mean you need to search the concatenation of two fields? You'll be able to use something similar to:

SELECT * FROM prospect
WHERE CONCAT(firstname,' ',lastname) LIKE '%ohn Smit%'

Is this is exactly what you're searching for?

SELECT * FROM prospect
WHERE firstname + ' '+ lastname LIKE '%name%'