Custom query params not working

I am unable to add a simple custom query to search for results in more than one table.

The query works fine, but only the parameters are not working for some reason? I tried adding the parameter name which is :P1 but it didn’t work, then I tried adding ? instead and still not returning any results.

Select Specialist.Name, Specialist.Department, loc.Name as LocationName FROM app.Specialist
LEFT JOIN app.SpecialistLocationPracticeLocation as specLoc ON (specLoc.SpecialistId = Specialist.Id)
LEFT JOIN app.Location as loc ON (loc.Id = specLoc.LocationId) 
WHERE Specialist.Name LIKE ?

I am trying to search for results which contain any of the words in the parameter, I can do this easily using normal query builder, however I am using NodeJS and Wappler is not showing tables from another db schema anymore, its only connecting to standard dbo schema. Any idea approximately when we will have this feature for Nodejs?

Also does wappler support wildcards like % and _ in the custom query, I tried with the wildcards and it wasn’t working like in MS sql server.

I can help with your last question, parameters in the custom query definitly can accept wildcards.

Here is how i have written it the code for a WHERE condition that filters by an input in a search field.

WHERE agents.team_id = :P1 AND (agents.first_name LIKE :P2 OR agents.last_name LIKE :P2)

And :P2 is

{{'%' + $_GET.search + '%'}}

1 Like

What do you mean and what database are you using?

I have a similar problem as this which was reported earlier. I was wonder when it could be fixed?

Some tables are not showing up in the db manager

It will be fixed in the next update, after our summer break.
Unlisting this topic now, as I see this has been reported in the bugs section already.

Got it. Thanks works perfect !

1 Like