Re: SqlFieldsQuery With Variable Number of Arguments
I am not sure this answers my question.
My question: How do I dynamically set the arguments in setArgs of SqlFieldsQuery.
sql1 = "select a,b,c from table x where age >?"
sql2 = "select a,b,c from table x where age >? and salary < ?"
sql3 = "select a,b,c,d from table x where dept = ? and age > ? and name = ? and city = ?"
As you see each sql has a different number of arguments. I want to be able to pass an array/collection to setArgs, and have it instantiate all the arguments in the SQL to the values that I am passing to setArgs.