parameterized query with wildcard

Bob Sneidar bobsneidar at
Wed Jul 29 18:06:34 EDT 2015

Okay I see my confusion. I can use a statement like:

select * from customers where customername LIKE '%int%’

This works. It seems however that when using parameter substitution it does not. In sqlYoga I can use: 

put sqlquery_createObject(“customers”) into qCustomerObject
put “customer name LIKE ‘%:1%’” into tConditions
put “int” into aBindings [1]
sqlquery_set qCustomerObject, “conditions”, tConditions
sqlquery_set qCustomerObject, “condition bindings”, aBindings
sqlquery_retrieveAsArray qCustomerObject, aCustomerData

This also works. I should also mention that my mail program *DOES* substitute plain quotes for smart ones. I am disabling that “feature” now. 

Bob S

> On Jul 29, 2015, at 14:35 , Bob Sneidar <bobsneidar at> wrote:
> How odd. I am thinking now, that because I am passing these query arguements to sqlYoga it is doing the macro replacement instead of SQL. Now that I think of it, I have never used this  in a direct SQL query. I am not even sure how to construct it. Is this a web server convention? I cannot see how you would inject the values in a direct query. 
> Bob S

More information about the Use-livecode mailing list