Jump to content

Sitewide Search - Requiring Multiple Tables


1internet

Recommended Posts

I want to be able to search my entire site over all the tables, e.g. restaurants, entertainment, hotels, etc.

How is this done?

Also what if I wanted to search through more than one clolumn, e.g. title and body, and then further, what if I wanted to rank the ones that contained the search query in the title, ahead of the ones in the body?

To get you started, your query could start as

 

mysql_query( "SHOW TABLES FROM name_of_database" );

 

or

mysql_query( "SELECT * FROM information_schema.`COLUMNS` C WHERE TABLE_SCHEMA = 'YOUR_DATABASE'" );

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.