MySQL like contains not working

Hi
I am trying to get a simple SQL query to work, the query works in my sql bench, gives me 1 result as it should, but, it does not work in the query builder in wappler

select `FirstName` from `ClientData` where `ClientData`.`FirstName` like ?

i have the test parameter set to ABC, and that works in sql bench, not wappler. I have the query string set etc etc

i just get no results

i think the image captures everything, shows table wiht column name, shows my variable, shows the sql, etc


is there a bug?

thanks

Something does seem wrong

if is replicate your setup

and run the query i see no results

If i run in the browser with get parameter manually added

http://localhost:3000/api/liketest?filter=brian

returns

{"query":[{"email":"brian@hyperbytes.co.uk","id":1}]}

which suggests that there may be a bug in the “run query” section of the query builder which fortunately does not seem to cause issues when the query is used in code.

@Teodor, am i missing something here?

thanks for taking the time on that, glad its not me being an adiot :slight_smile:

thanks

1 Like

For run query, I think you need to specify % symbol in the test value.

i tried messing around with the % and it never seemed to work, thanks

Can you try to enclose the test value inside double curly brackets?

no, same, no results

what happens to these tickets when it becomes a bug not user error, i have a bunch of tickets like this, where its clear something is not working as designed and they seem to just stall. If its user error the wappler team (especially @Teodor) is very quick to reply with guidance, but when its a bug, they seem to just die. I seem to keep hitting little buggy areas and have to keep leaving parts of my project as ‘come back to later’. this one, no like work, i have another where selected values not working, pdf creator giving blank pdf on mobile devices etc, should we be reporting them as bugs or does the wappler team convert these posts, but some feedback would be nice from the team

thanks

Well when we are able to recreate the issue, we convert it to bug report and then we provide a fix. Our team had a little break the whole last week so we were monitoring the forums not that often as usual.

Is your issue just in the query builder testing? Or does your condition also not work when your query runs on the page?

How exactly this test query dialog would actually stop you from working on your project, when you can actually test it on your page with an actual value passed with the GET param? Your site does not rely on the query builder dialog in Wappler. It’s just for your own testing, but the question here is the one i asked above - is the actual query failing or is it just the test functionality in the query builder dialog?

Hi. no problem, I knda knew the team was off I saw a post from George.

the particular bug is not the test parameter, like conditions do not work, as verified by @Hyperbytes

so it doesn’t stop me per se, but, i have a number of small bugs that do keep stopping useful things working, i have a page that lists over 500 clients right now, and i want to stop it displaying such a list of clients and make it a searched list of results based on a contains query, and the contains does not work, either custom or simple query builder.

thanks

I don’t see this verified by Brian, he says:

I also tested a query using the Contains filter in the query builder and it works perfectly fine when the query is used on the page and filters are sent to it.

If you have a link to page using such a query, please provide a link where we can check what’s going on.

ah i read his reply wrong, i will try it and see if it wokrs and gives results on the website, i didnt get beyond the query builder as it was giving no results i did not implement the front end search form as i tend to start on the server connect, will give it a go and see if it gives results despite not giving them in the query builder. will report back.
thanks

You can always test the query directly in your browser, testing in the query builder is not essential or required for your website to work.

1 Like

Confirming, in my tests the contains action works as it should when used in an API action, the issue appears localised to the query test feature of the query builder only.

just to also confirm the it does work, just not in the query builder, thanks

Fixed in Wappler 6.5.5

This topic was automatically closed after 12 hours. New replies are no longer allowed.