How to search value in all tables and columns - PHP & MySQL

preview_player
Показать описание
How to search value in all tables and columns - PHP & MySQL

- Get all tables in the database
- Get all columns in each table
- Get all rows in each table where a specific keyword is found
- Search value in all columns of each table
- Use of LIKE clause in MySQL

Source code:
Рекомендации по теме
Комментарии
Автор

Nice tutorial! How to hide the tables that doesn't have the search match? Many thanks! 😀

RLgaming
Автор

what if I want to show only specific columns? and then the results of search has linkable to the another php page?

ronnelmunez
Автор

Hey, i need your help so hardly.Actually i have multiples table in my db.What i want is if i write value in search box, it could search all tables in db to fetch that result.e.g i search samsung mbl, then it could search all table and fetch me the result from mobiles table and if i write shirt then fetch from shirt tables and if i write blue bag then fetch from bags table.plus it should only that result detail in my front page.

aleenafaiz
Автор

Nice tutorial. How can we achieve this for REST API?

esQmo
Автор

This code works but still generates the following error at the bottom of the result:

Warning: mysqli_fetch_object() expects parameter 1 to be mysqli_result, bool given
Warning: mysqli_data_seek() expects parameter 1 to be mysqli_result, bool given
Warning: mysqli_fetch_object() expects parameter 1 to be mysqli_result, bool given

Any idea why this is showing up?

fazalsheerazkhan
Автор

Fatal error: Uncaught TypeError: mysqli_fetch_object(): Argument #1 ($result) must be of type mysqli_result, bool given in

I have such issue and I do not really know what to do with it. The code is the same...

Any ideas?

jackovi
Автор

what if i need the only one table name if i search in tables? what i mean is if i search table name not all.
please help :(

onepiecezoro
Автор

how can hide the user or the password?

pogiako