making an internal search

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
User avatar
montyauto
Forum Commoner
Posts: 25
Joined: Sat Jan 13, 2007 7:05 am

making an internal search

Post by montyauto »

i need to make an internal search for my website.

I need to be able to search through maybe 5-10 Mysql tables. the thing i was looking into was the LIKE function in mysql...

but, i dont really know how to use that...

any help would be appreciated, or a good script others use.
User avatar
xpgeek
Forum Contributor
Posts: 146
Joined: Mon May 22, 2006 1:45 am
Location: Kyiv, Ukraine
Contact:

Post by xpgeek »

For Mysql search you can use MySQL FULLTEXT index.
And of course you can use LIKE in you queries.
Also you can use another search engines and libraries.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: making an internal search

Post by califdon »

montyauto wrote:i need to make an internal search for my website.

I need to be able to search through maybe 5-10 Mysql tables. the thing i was looking into was the LIKE function in mysql...

but, i dont really know how to use that...

any help would be appreciated, or a good script others use.
http://www.sql-tutorial.net/SQL-LIKE.asp?
thewebdrivers
Forum Commoner
Posts: 41
Joined: Fri Aug 17, 2007 3:32 pm
Location: india
Contact:

Post by thewebdrivers »

Code: Select all

select * from table name where columnname like '%abc%'
you can use the percent sign as you like. % is a wildcard character and equivalent to "any set of characters"
User avatar
montyauto
Forum Commoner
Posts: 25
Joined: Sat Jan 13, 2007 7:05 am

Re: making an internal search

Post by montyauto »

yes nice to have this link..
Post Reply