Topic: Search btn with sql query

first of all im in love with MVD

i tried so hard to learn how to create simple databases but with MVD is way easy

i tried to create a recursive search button using SQL QUERY

i have a entry where you put part of the name you search for and want to show a list of all lines have text entry in them

i tried and i know is not working thats why i ask for you help

select users.username from users where users.username LIKE '%+Form1.useredit.text%'

Re: Search btn with sql query

Hi,
Try it like this:

select users.username from users where users.username like '%{form1.useredit.text}%'

For something like this, you could just use the 'search' option rather than 'sqlquery'.
Derek

3 (edited by sparrow 2022-07-05 11:55:22)

Re: Search btn with sql query

Hi all,


if you use Button SQL Query

use

select users.username from users where users.username like '%{useredit}%'

only component name {useredit}

http://myvisualdatabase.com/help_en/SQLquery.html

Re: Search btn with sql query

i want to use a query for recursive Search but with search action MVD provide its a absolute search if i don't type the full name the search action wont give me any resoult

and the query you propose is not working it show no resoult what so ever

Re: Search btn with sql query

sparrow wrote:

Hi all,


if you use Button SQL Query

use

select users.username from users where users.username like '%{useredit}%'

waw thank you so much is work perfectly thank you again

Re: Search btn with sql query

i want to use a query for recursive Search but with search action MVD provide its a absolute search if i don't type the full name the search action wont give me any resoult

and the query you propose is not working it show no resoult what so ever

No, it is not an 'absolute' search (and the query does work).
Use the  'search' function with a filter of '%s%'.   Also optionally, use the 'increm.search' option to trigger your search automatically (see screenshot in the attached example).
Derek.

Post's attachments

Attachment icon barkouk.zip 389.1 kb, 278 downloads since 2022-07-05 

Re: Search btn with sql query

derek wrote:

i want to use a query for recursive Search but with search action MVD provide its a absolute search if i don't type the full name the search action wont give me any resoult

and the query you propose is not working it show no resoult what so ever

No, it is not an 'absolute' search (and the query does work).
Use the  'search' function with a filter of '%s%'.   Also optionally, use the 'increm.search' option to trigger your search automatically (see screenshot in the attached example).
Derek.

waw like that, thank you so much

Can i ask you something why don't you create videos on youtube better then those 2 videos from 3 or 4 years ago

Re: Search btn with sql query

What would you like to see in these videos?

9 (edited by z.barkouk 2022-07-06 16:30:21)

Re: Search btn with sql query

tcoton wrote:

What would you like to see in these videos?

Im a guy learn by going it

so i think create a database but with deep explaining of each option and mostly how to use scrpting

Re: Search btn with sql query

Does anyone know how to implement incremental search via script. I have no choice but to use a script to replace a button that was working fine and I am stuck with a rather complex query in script that has to look for entries in form1.globalsearch field.

up to now, I got a button with a on click procedure for a sql query :

select blahblahblah from table where conditionA like "%'+form1.GlobalSearch.text+'%" or conditionB like "%'+form1.GlobalSearch.text+'%"

The query works but I don't get how to trigger an incremental search from the form1.Globalsearch text field via script.

Re: Search btn with sql query

Hi Thierry,
Does something like this help?  (see attached).
Regards,
Derek.

Post's attachments

Attachment icon incremental search by script.zip 443.19 kb, 118 downloads since 2023-10-26 

Re: Search btn with sql query

Hi Derek,

thank you so much, it is so much easier than what I was doing, this solution allows to keep the automatic date format instead of having to manipulate it with complex SQL Queries!! I love simplicity!!

Re: Search btn with sql query

How has your experience been with using MVD for database creation, and what specific challenges have you faced in implementing recursive search functionality?

smile

Re: Search btn with sql query

Hi,
Never had any problems creating databases nor ever had any issues with the various search options available in MVD..
Perhaps it would be better to mock-up an example that illustrates the points in your message, zip the application folder and attach it.  Then people can address any specific concern you have..
Derek.

Re: Search btn with sql query

How has your experience been with using MVD for database creation, and what specific challenges have you faced in implementing recursive search functionality? Can you provide examples or elaborate on particular aspects of your database creation process or challenges with the recursive search functionality in MVD?

smile

Re: Search btn with sql query

Twice the same post with 2 different nicknames smells fishy.