search functionality in php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
heshan
Forum Commoner
Posts: 26
Joined: Tue Jul 13, 2010 1:16 pm

search functionality in php

Post by heshan »

Hi,

Can anyone knows how to implement the search functionality in php? I mean the php code which can be used in searching?

Thanks,
Heshan.
buckit
Forum Contributor
Posts: 169
Joined: Fri Jan 01, 2010 10:21 am

Re: search functionality in php

Post by buckit »

You'll need to be more specific... what are you searching? a database?

an example SQL statement would be

SELECT firstname, lastname FROM users where firstname LIKE '%{$searchWord}%' OR lastname LIKE '%{$searchWord}%'
Post Reply