[Solved] Query based on form fields
Posted: Wed May 20, 2020 9:30 am
Hi, I want to do in my opinion easy task, but it drives me crazy.
I have a simple table with DATE column. The only think I want to do is make form, in which user select to dates in date input field and the form displays all records from the table between this two dates.
I created this sql which works fine: SELECT * FROM "MyTable" WHERE "Date" >= {D '2020-05-15' } AND "Date" <= {D '2020-05-16' }
But instead of fixed dates I want it replace by user input. So I thought that user will select the dates in form and I attach somehow this sql to push button. But I don't know how.
I don't insist on using the push button', but it must be somehow controlled from the form, not from oo Base filtres etc.
Anybody any idea, pls?
Thanks
I have a simple table with DATE column. The only think I want to do is make form, in which user select to dates in date input field and the form displays all records from the table between this two dates.
I created this sql which works fine: SELECT * FROM "MyTable" WHERE "Date" >= {D '2020-05-15' } AND "Date" <= {D '2020-05-16' }
But instead of fixed dates I want it replace by user input. So I thought that user will select the dates in form and I attach somehow this sql to push button. But I don't know how.
I don't insist on using the push button', but it must be somehow controlled from the form, not from oo Base filtres etc.
Anybody any idea, pls?
Thanks