Topic: search a phrase/ word in database irrespective of column & row

hiii,

I want to make a search field with button. my aim is to search the word/ phrase in the entire database irrespective of column & show in the table grid.

a sample screen shot made in excel attached.
any help is highly appreciate because in my existing programm i am able to do search by column  wise linked to different fields in the interface.

Post's attachments

Attachment icon Capture.PNG 10.02 kb, 60 downloads since 2022-02-18 

Re: search a phrase/ word in database irrespective of column & row

nrmuduli wrote:

hiii,

I want to make a search field with button. my aim is to search the word/ phrase in the entire database irrespective of column & show in the table grid.

a sample screen shot made in excel attached.
any help is highly appreciate because in my existing programm i am able to do search by column  wise linked to different fields in the interface.

 
if you need to request this program from scratch, then prepare your wallet.
if you already have a program and you need help, then attach your project
   
если вам нужно запросить эту программу с нуля, то подготовьте свой кошелек.
если у вас уже есть программа и вам нужна помощь, то прикрепите свой проект

Re: search a phrase/ word in database irrespective of column & row

The database is not excel.
Such a question may indicate a poor structure of the database.
For a script, the request would look like

SELECT * FROM table WHERE (col1 || col2 || col3 ... colN) LIKE '%val%'


!!! such a query needs to be finalized, since when combined, arbitrary combinations of words can be obtained. !!!
But I would pay attention to the database. Excel and databases are two different things.

Re: search a phrase/ word in database irrespective of column & row

sibprogsistem wrote:
nrmuduli wrote:

hiii,

I want to make a search field with button. my aim is to search the word/ phrase in the entire database irrespective of column & show in the table grid.

a sample screen shot made in excel attached.
any help is highly appreciate because in my existing programm i am able to do search by column  wise linked to different fields in the interface.

 
if you need to request this program from scratch, then prepare your wallet.
if you already have a program and you need help, then attach your project
   
если вам нужно запросить эту программу с нуля, то подготовьте свой кошелек.
если у вас уже есть программа и вам нужна помощь, то прикрепите свой проект

hello, i have attached the sample project since my original program has some sensitive information. pl. help me if you can.

Post's attachments

Attachment icon t2.zip 333.09 kb, 128 downloads since 2022-02-18 

Re: search a phrase/ word in database irrespective of column & row

Hi Nrmuduli,
One way is to concatenate every field that you are interested in (it may be all of them or just a subset) into a calculated field and use that calculated field to search on.
Please see the attached.
Derek.

Post's attachments

Attachment icon t2a.zip 336.18 kb, 162 downloads since 2022-02-18 

Re: search a phrase/ word in database irrespective of column & row

Hi Derek


I would also add spaces between columns or some other sign.
The result will be more predictable.

7 (edited by nrmuduli 2022-02-18 11:45:13)

Re: search a phrase/ word in database irrespective of column & row

derek wrote:

Hi Nrmuduli,
One way is to concatenate every field that you are interested in (it may be all of them or just a subset) into a calculated field and use that calculated field to search on.
Please see the attached.
Derek.

hii, Derek,
Exactly meet my requirement without much complexities. But how to make it with mysql.
Thank you.

If any one have other solution then pl. post. this will surely increase the knowledge.

8 (edited by nrmuduli 2022-02-18 11:52:42)

Re: search a phrase/ word in database irrespective of column & row

Sorry, for not mentioning that my database is mysql .I am trying it but in mysql it s not working.

Re: search a phrase/ word in database irrespective of column & row

in calculated field use
CONCAT(ifnull(lot,''),ifnull(element1,''),ifnull(element2,''),ifnull(element3,''))

Re: search a phrase/ word in database irrespective of column & row

sparrow wrote:

in calculated field use
CONCAT(ifnull(lot,''),ifnull(element1,''),ifnull(element2,''),ifnull(element3,''))

thank you!, works perfectly with existing data.
i am now trying to get the work done with tables having foreign key. i will let you know if any help required.
once again thank you.