PHP Classes
elePHPant
Icontem

Search Entire Database: Search for a value in all MySQL database tables

Recommend this page to a friend!
  Info   View files Documentation   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2015-07-06 (1 year ago) RSS 2.0 feedNot yet rated by the usersTotal: 477 All time: 5,679 This week: 1,109Up
Version License PHP version Categories
search-entire-db 0.1GNU General Publi...5PHP 5, Databases, Searching
Description Author

This class can search for a value in all MySQL database tables.

It can connect to a given MySQL database and retrieves the list of all database tables.

The class queries each of the tables to search of a given values in all columns of the table.

The class sets an array variable with the list of tables and columns on which the given value was found.

Picture of Kiyarash Sanjarani Vahed
Name: Kiyarash Sanjarani Vahed <contact>
Classes: 1 package by
Country: Iran Iran

Details

Search Entire DB

<h6>Author :</h6> <h4>Kiyarash Sanjarani Vahed</h4><br> <h6>Contact:</h4> <br> <h5><code>+98</code> <code> 910 937 5880 </code> </h5> <br> <hr> E-mail : kiarash.3tar@gmail.com<br> website: ksvahed.ir<br>

Search Engine for huge DataBases...<br> Using this class is quite easy: just make an object and give these arguments : <br><br> Arguments: <br><br> 1/DB name<br> 2/Username<br> 3/Password<br> 4/Column Name that you want to search or give it NULL if you want to search all fields<br> 5/The text that you are looking for <br>( You can search an integer value but becareful because the search result will be as string.... )<br><br>

Sample: $obg = new searchEntireDB(DBName, userName, password, columnName, targetText);<br><br>

and then use the result;<br><br>

that's it...<br><br>

<h4><em>How to use result:</em></h4><br> There are two propeties for check and use search result,<br><br>

first :<h5>$obj->_finalResult</h5> that's an array contains search result

second : <h5>$obj->_reports</h5> that contains report about search. The report is associative array that have these indexes:<br>

`I-->   'emptyDBs'` if there was empty table(s)<br><br>
`II-->  'result'` that's nested array structured like this: <h3>&dArr;</h3><br>
          		 
         		  
        	 'tableName1' =>
				array (size=1)
				  'Column Name' => string 'SearchResult'
			 'tableName2' => <br>
				array (size=1)
				  'Column Name' => string 'SearchResult'
			 'tableName n' => <br>
				array (size=1)
				  'Column Name' => string 'SearchResult'
				  
				  
				  

III--> The name of tables have value; structured like this: <h3>&dArr;</h3> <br>

		 `'notEmpty' => `<br>
		 
			  array <br>
				 0 => string 'tableName1'<br>
				 1 => string 'tableName2'<br>
				 2 => string 'tableName3'<br>
				 3 => string 'tableName n'<br><br>
				 
     
		&#9788; notEmpty shows which table(s) is(are) not empty...
		

<h6>If you are not sure that which column have the right value, just give NULL to 4th argument...</h6> <br>

Please feel free to improve and use this class and please let me know if you found bug or problem...

Enjoy the life...

  Files folder image Files  
File Role Description
Plain text file searchEntireDB.php Class simple php search engine
Accessible without login Plain text file readme.MD Doc. help for using this class

 Version Control Unique User Downloads Download Rankings  
 0%
Total:477
This week:0
All time:5,679
This week:1,109Up