Log in

View Full Version : Search words in database



d-machine
03-08-2009, 02:11 PM
Hi,

I'm trying to build a simple search engine to my PHP site. I finished building my MySQL database, which includes 15 tables. Now I don't know how can I search words trough my database..

I want that when I search few words it will return me the name of tables which there exist in.

How can I do it?

Thanks in advance. :)

ganeshseo
04-09-2009, 07:25 AM
Provide your Site link

amutha
04-10-2009, 10:33 AM
You want Search Word or table :confused:

If you search word .. Use this query
$textbox=$_REQUEST['textbox'];

mysql_query("SELECT column_name(s) FROM table_name WHERE column_name LIKE %$textbox%")