Problems with Database Query

It doesn’t even work in or
And it doesn’t even work if I insert a single filter

Ok so something is not working sending your parameters to the query, maybe post your code for the filter inputs and your server connect component and your server actions $_GET or $_POST

Um.
I believe the problem is in the query code generated by Wappler. It works well with PHP and maybe with NodeJs you need some different configuration
I hope Teodor can give me the solution

No new answer?
Is it possible that there is no solution?
For the moment I gave up add the filters to the query
But it’s a problem that goes solved in my opinion

You realise there are a few people on this forum that can help you Marzio, if you just provide the information we are requesting.

I know you think the problem is with NodeJS being different to PHP, and maybe you are perfectly correct, but we can only get to the bottom of it once we have checked every other part first. I am personally using NodeJS and running about 12 text inputs via $_GET into a database query, so I know NodeJS is working and what you are trying to do should work perfectly.

Hello Paul
It is a very elementary query setting, which I often use and has never given me problems.
In this case the only differences are that the site is in nodejs and bootstrap 5, so probably the cause is one of the two
In practice, if you impose a simple query to list the records of a table and make the test, it works perfectly and lists all the records correctly, but if I insert a filter variable for one of the text fields and in the WHERE conditions set the text field -> Contain -> filter variable, in this case the test does not give me results.
And this never happened to me.

I am using NodeJS with Bootstrap 5 too though and doing the exact same thing as you describe and it is working perfectly, which is why i am wondering if something is not quite perfect, maybe through testing you changed something, which is why I figured a quick little look would resolve that possibility. Can’t harm trying?
Fairly complex filtered query with BS5 and NodeJS

There has to be something that is populating those filters, or the query returns a result even without them, in other words it is not dependent on them.

That would be empty Marzio, you can not use open in browser with a filter like that as there is nothing there to send the filter information, so that test will produce no result.

Can you send a screenshot of the <dmx-serverconnect id="serverconnect1" url="api/xxx"></dmx-serverconnect>

Then a screenshot of your text inputs in the page that you type in the filters.

Then a screenshot of the server action GET variables and the WHERE conditions, like this


With those 3 parts we should be able to figure out whats wrong.

Another site php BS4

It is not so for other projects. Contain is not Equal

Fair enough, I just ran a similar test with contains and its also empty though. I tried Wappler 3.9.9 and 4.0.3 and Node and PHP, so not sure about that one, but maybe it is actually working and you are basing your working or not on the results of the test in browser, have you tried it on the real page itself.

Edit: even when i look through the json of the server action it shows contain as LIKE in MySql, and if I run an empty LIKE directly in Navicat it also give no results. The only operator that will still give results is <> in MySql which in Wappler is NOT LIKE
Maybe that helps, not sure.

Local or remote the same result
The problem is that with the ACtion containing the filters the page that lists the products is empty and instead in the absence of a value in the filter should bring back all the records
How to take place for all previous sites that have this setting

With Wappler latest version, the other previous sites do not present this problem, so I don’t think it depends on this
As soon as I have some time to devote I can try on a nodejs project but with bootstrap 4, or on a php project with bootstrap 5

Why dont you just add a condition to it then, I know its not how it used to work, but this would be more correct anyway.
2021-09-09_17-15-37

I don’t know exactly how I can put this condition. Now I have to go out, I’ll take up tonight

Hello Paul
your idea seems to be the winning one
I inserted the filters into groups by adding the condition
Now at the action level it seems to work as all the records are reproduced
Now I just have to check if the filters work on the page
Thank you I’ll let you know

1 Like

If this is the solution, probably the problem is caused by a different BS5 behavior than BS4

unfortunately, however, the filters do not work
maybe I didn’t configure your suggestion well?

I correct myself
If I use only one filter with your condition, the page also works regularly
Now I have to see how I can join more filters without causing the problem