PHP Classes

Basic MySQL Search Engine Class: Search for text in a MySQL database table

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum (5)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 67%Total: 10,114 This week: 1All time: 130 This week: 571Down
Version License Categories
searchengine 1.0.0BSD LicenseDatabases, Searching
Description 

Author

This class can be used to search for data in MySQL database table text fields.

It executes one or more SQL SELECT queries to search for given keywords in different text fields of the same MySQL database table.

The class returns an array with the values of primary keys of the table records returned by the queries. Duplicate record entries are eliminated.

Picture of padik
Name: padik <contact>
Classes: 1 package by
Country: Philippines Philippines
Age: 41
All time rank: 2406 in Philippines Philippines
Week rank: 420 Down5 in Philippines Philippines Up

Details

This is a basic MySQL search engine class you can use immediately to your site. All you have to do is fill up basic database configurations. Steps: 1. Specify your host, username, password in array form 2. Specify the tablename you want to use 3. Specify primary key field of the table 4. Specify the fieldnames of the table you want to look up Example: /* <?php require_once 'class.search.php'; $config = array('localhost','root','','database'); // basic db configurations $table = 'bizmain'; // tablename you want to search $key = 'biz_id'; // primary key field of the table $fields = array('biz_name','biz_address','biz_cat'); // fieldnames of the table // you want to look up for keyword occurence $keyword = $_POST['keyword']; $found = new search_engine($config); $found->set_table($table); $found->set_primarykey($key); $found->set_keyword($keyword); $found->set_fields($fields); $result = $found->set_result(); print_r($result); ?> */

Screenshots  
  • output.jpg
  Files folder image Files  
File Role Description
Plain text file class.search.php Class Search Engine Class
Plain text file form.php Aux. Form File
Plain text file process.php Example Process File
Plain text file README.txt Doc. README
Plain text file sql.txt Data MySQL table

 Version Control Unique User Downloads Download Rankings  
 0%
Total:10,114
This week:1
All time:130
This week:571Down
User Ratings User Comments (3)
 All time
Utility:87%StarStarStarStarStar
Consistency:87%StarStarStarStarStar
Documentation:70%StarStarStarStar
Examples:79%StarStarStarStar
Tests:-
Videos:-
Overall:67%StarStarStarStar
Rank:451
 
very simple with awesome documentation
10 years ago (farrukh amin)
77%StarStarStarStar
very good script.
13 years ago (pk1774)
77%StarStarStarStar
Excellent
14 years ago (kishore kumar)
80%StarStarStarStarStar