I need to test mysql queries in Mysql client. Therefore i need to define array in mysql, but i can't find how? Could you help me please? I define array from backend:
WHERE
rates.id IN (:array) //node or rates.id IN ($array) php
I need to test mysql queries in Mysql client. Therefore i need to define array in mysql, but i can't find how? Could you help me please? I define array from backend:
WHERE
rates.id IN (:array) //node or rates.id IN ($array) php
I'm not aware of any language/library supporting parameterized queries that supports collections of any sort as parameters. If you can find no other way to do it, using FIND_IN_SET should allow similar behavior (though you'll have to turn your array into a single string parameter; and it is a string function, and function in general, so it will make the query slow.
Performance-wise you are better off just manually constructing your query with the list in it; but then you lose the benefits/security of parameterization.