Login   Register  
PHP Classes
elePHPant
Icontem

Database Search: Search for words and phrases in a a MySQL table

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   Screenshots Screenshots   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2005-12-06 (8 years ago) RSS 2.0 feedStarStarStarStar 65%Total: 9,232 This week: 1All time: 147 This week: 1,397Down
Version License Categories  
dbsearch 1.0GNU General Public Lice...Databases, Searching
Description Author  

This class can be used to search for words and phrases in text fields of a MySQL database table.

It can generate a Web search form with an input field to enter the search text, a submit button and radio buttons to let the user tell whether the search should find records with all the words or at least one of them. The form text and presentation style is configurable with CSS.

The class can perform the search for the specified text with prior cleanup to avoid security exploits. The searched text is stored in a session variable so the user can be reminded of the last search.

The search can treat words separately or as phrases when the user encloses the words in double quotes.

The search results are returned in an array that contains a list of distinct records that matched the searched text.

The table name and the table fields to be searched and the fields to be returned as result of the search are configurable.

Picture of Tomasz Wilk
Name: Tomasz Wilk <contact>
Classes: 1 package by
Country: Poland Poland
Age: 34
All time rank: 2402 in Poland Poland
Week rank: 1080 Down29 in Poland Poland Down

Screenshots  
  • dbsrch.jpg
  Files folder image Files  
File Role Description
Plain text file DatabaseSearch.php Class DatabaseSearch class definition
Plain text file DatabaseSearchDocumentation.txt Doc. Short manual
Plain text file DbSrchExample.php Example How to use this class.

 Version Control Unique User Downloads Download Rankings  
 0%Total:9,232All time:147
 This week:1This week:1,397Down
User Ratings User Comments (1)  
 All time
Utility:80%StarStarStarStarStar
Consistency:82%StarStarStarStarStar
Documentation:83%StarStarStarStarStar
Examples:85%StarStarStarStarStar
Tests:-
Videos:-
Overall:65%StarStarStarStar
Rank:475
 
Hi.
5 years ago (Alexander Farennikov)
27%StarStar