Juarez Posted April 16, 2013 Share Posted April 16, 2013 Hi I will be receiving a text file with the values below on a regular basis. I'm creating a form where the final aim is to import each row of these values and use each row of values as the parameters of a stored procedure in MYSQL. There is only one stored procedure so I will run the stored procedure the required number of times with each row of values and output the results as one result set. My question is about the best method to achive this before I start. Would it be best to import the values to an array and then use the array as the input parameter for the stored procedure or import them to a temp table or something? chr start endchr22 50478251 50481750chr22 50313501 50331250chr22 50543751 50557250chr22 50637751 50645250chr22 50904001 50929000 thanks Link to comment https://forums.phpfreaks.com/topic/277003-passing-an-array-as-input-parameters-to-a-stored-procedure/ Share on other sites More sharing options...
lemmin Posted April 16, 2013 Share Posted April 16, 2013 I believe you can only pass string variables when calling a stored procedure. Since you would need to pass a bunch of different variables instead, I would lean toward the temp table solution. You probably won't even need to call the procedure multiple times if you already have the data in a table. Link to comment https://forums.phpfreaks.com/topic/277003-passing-an-array-as-input-parameters-to-a-stored-procedure/#findComment-1425077 Share on other sites More sharing options...
Juarez Posted April 16, 2013 Author Share Posted April 16, 2013 thanks, I'll look into this method Link to comment https://forums.phpfreaks.com/topic/277003-passing-an-array-as-input-parameters-to-a-stored-procedure/#findComment-1425085 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.