Hi all,
I’m trying to do a query using the like operator with % ( a percent sign (%) that matches any sequence of zero or more characters ), example SELECT * FROM clients WHERE country = ‘France’ AND city LIKE ‘% a%’
In queries.properties I’ve tried:
GetClientsByLike = SELECT * FROM client WHERE country =: country AND city LIKE%: city% but did not work,
also tried … LIKE :city and pass % sign via parameter, but also did not work.
thanks
Paulo
I found the solution with using URL Encode at form (at parameter).
Example:
quey SELECT * FROM client WHERE country LIKE :country
at form, in the input field with variable country, I put, %25a%25
it´s works, and return:
[{“first_name”:“William”,“last_name”:“Jobs”,“city”:“Grenoble”,“country”:“France”},{“first_name”:“Walter”,“last_name”:“Bates”,“city”:“Paris”,“country”:“France”},{“first_name”:“Daniela”,“last_name”:“Angelo”,“city”:“Rio de Janeiro”,“country”:“Brazil”}]