What is the best way to pass an array from php to MySQL stored procedure? -



What is the best way to pass an array from php to MySQL stored procedure? -

i looking pass list of id's php mysql stored procedure can bring together list. know don't want pass array csv list sp, i'm not sure best practice do.

with sql server i've built xml object pass sp , bring together this. seems bit overkill, , i've never been sure idea.

is there simple, efficient way of taking list of id's in array in php , passing mysql sp can utilize in join?

i've read through related question, haven't found reply looking for: parameterizing sql in clause?

a related question solve problem one: php array input stored procedure

but looking utilize stored procedure rather building sql code within php.

what best practice in case?

pass array string parameter, build query , run using prepared statements.

php mysql

Comments

Popular posts from this blog

delphi - blogger via idHTTP : error 400 bad request -

c++ - cuda, pycuda -- how to write complex numbers -- errors:class "cuComplex" has no member "i" -

How do I check if an insert was successful with MySQLdb in Python? -