So, I need to use PHP to get the field names and values from the where statement from the sql query, change them, and then return the item again.
So, let's say this line is given to me: field='value' AND field2<7I need to define field and field2 as field names, and then pass it through a function field()and put them back into the request. Same thing with "value" and "7", but feed them through a function value(). It will also help you know which field each value is associated with.
Is there a way to do this so that it doesn't take several thousand lines for the code?
I need it to work with many different possible inputs, including things like: table.field BETWEEN 7 AND 10orfield<7 AND (field2=3 OR field3=4)
source
share