2

I want to use arrays in mysql stored procedures.

i.e. array would look like

(0 =>array('name','value','value1'), 1=> array('name1','value2','value3))

I want to loop through each of them and perform some action on different tables. Can i do this ?

2 Answers 2

3

Stored Procedures do not accept arrays; you can, however, send as many input values as you want, as long as it matches the number and types of parameters declared in the stored procedure.

Hope this helps.

Sign up to request clarification or add additional context in comments.

Comments

1
  • If you want to pass more then one item, then use additional (temporary) table instead of IN parameters.
  • If you need to pass items one by one - ('name','value','value1'), then use some IN parameters - (IN name VARCHAR(255), IN value1 INT(11), IN value2 INT(11))

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.