azzazzello
Technical User
Hi there,
I have an application which returns a particular variable as a comma-separated list (e.g. 5,blah,4,78,gamma). I need to select all rows where a MySQL variable is equal to any one of those entries. If I could quote the list in the application, this would be easy -
SELECT * from mytable where myfield IN ('5','blah'...)
but the application does not allow me to quote all it allows me to do is use it in a query as a block. Is there any trick I can use to select rows that match entries in this blob of a variable?
I have an application which returns a particular variable as a comma-separated list (e.g. 5,blah,4,78,gamma). I need to select all rows where a MySQL variable is equal to any one of those entries. If I could quote the list in the application, this would be easy -
SELECT * from mytable where myfield IN ('5','blah'...)
but the application does not allow me to quote all it allows me to do is use it in a query as a block. Is there any trick I can use to select rows that match entries in this blob of a variable?