Page 1 of 1

custom search query

Posted: Sun Mar 18, 2018 5:13 pm
by Timo
If I understand the function nuForm() correctly, when the parameter string4 is specified, a where clause is built like
field1 like %searchstring% or field2 like %searchstring% or ...
It would come in handy if you could pass a custom where clause as parameter.
For example, in a browse form I could add two date fields with a filter button and could build queries like
date_field BETWEEN '%date1%' AND '%date2%' .There are endless more examples. This would give much more flexibility.
nuForm() could recognize if hash cookies are used as search string and then add the custom where clause instead of building a like ... or ... like where clause.

Re: custom search query

Posted: Mon Mar 19, 2018 12:17 am
by admin
Timo,

You can.

You need to put BETWEEN '%date1%' AND '%date2%' in a Hash Cookie - and use that Hash Cookie in the Form's SQL.

https://wiki.nubuilder.cloud/ ... Custom_SQL


Steven

Re: custom search query

Posted: Wed Mar 21, 2018 3:47 am
by Timo
All right, I'll give it a go

Re: custom search query

Posted: Wed Mar 21, 2018 10:24 pm
by admin
.