I am trying to use parameters to filter a query. And at first i succeed with one parameter :P2 but any other i put doesn’t work. As you see if i manually enter a value in the Sql it works so the record is there. Ps2 works , but not P4. I recreated several times.
I think that you should have used posted values from your form rather than URL values which mean nothing on the server.
Have a look at https://www.diffen.com/difference/GET-vs-POST-HTTP-Requests
As u see in second shot I supplied test values. It works with one paramter only.
My bad, I should have looked closer.
Couple of things
Firstly, assuming o_id is a unique key using “=” rather than like would be better than like. If works as they are the same length otherwise it would break
‘Like’ is a string comparison operator so if strings may be different lengths (you did use data type varchar rather and char?) it wont work, you should try adding a trailing wildcard to the test data i.e. use ‘johnny%’.
Also if you want it to pick up “Johnny Jim” but also “Jim Johnny” use ‘contains’ rather than ‘like’ which is equivalent to “%johnny%”, wild card at start and end
Lastly why are you using a custom query when this can be build visually with the standard Database query? You are just making things difficult for yourself.
Was not aware i could use Inner Joins in normal query builder. I will try that.
Could not get more than one parameter to work. The sql statement is as i want it and is correct i think.
thanks
i will try the normal builder for now. But i see there is no test feature on the query builder. thats a great feature!
Yes, inner, left and right are available, just add the extra table(s) and the join dialogue will open