5 pts.
 passing array as parameter to stored procedure in mysql
how to passing array as parameter to stored procedure in mysql?

Software/Hardware used:
ASKED: March 27, 2010  6:53 AM
UPDATED: April 9, 2010  2:57 PM

Answer Wiki:
AFAIK that is not allowed in MySql. You can, however, construct a comma separated string and pass it as a varchar.
Last Wiki Answer Submitted:  April 8, 2010  12:38 am  by  carlosdl   63,535 pts.
All Answer Wiki Contributors:  carlosdl   63,535 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Use implode() to change your array into a string.

$array = array('lastname', 'email', 'phone');
$comma_separated = implode(",", $array);

echo $comma_separated; // lastname,email,phone

Then when you retrieve it from the database use explode().

$array = explode(",", $string);

 20 pts.