Generally you shouldn't be encrypting data stored in a database that you need to search over.
In your example you give, it would be helpful to know the context of why you are grabbing a user by first name, and what your overall security concerns are...
$hashed_search = myhash('John');
$q = 'SELECT * FROM table WHERE first_name_hashed = '.$hashed_search;
Is this a web app and your main concern is unencrypted transmission of a user's personal info over the network? Use an encrypted connection when sending data between the user's PC and the server (e.g. 'https').
Is your concern someone hacking the server and downloading a copy of the database? Consider limiting the amount of personally identifying info you are storing. Do you really need to store a user's real name?
Assuming you DO need to store personally identifying information about a user, consider using other methods to fetch their records from the database than using the personally identifying parts (i.e. don't grab them by 'first_name'). Consider grabbing a user by ID or by a Username that can be unrelated to their real names. This will allow you to make use of Indexing for fast retrieval of records and you can encrypt their personal info (first name, last name, email, phone #, etc) to your heart's content.
If this doesn't help you, maybe provide some more context about what you're trying to accomplish and why.
TLDR: Trying to search over encrypted data is a bad idea. Think of what problem you're trying to avoid and come up with an alternate solution.