How to pass an array from PHP SP call and execute SP in sql server with unknown number of parameters? -


i have following result output of query q1 stored in array called $temp: note: size of following array not same everytime, vary.

$temp = array('one', 'two', 'three', 'four', 'five', 'six'); 

i trying call sql server stored procedure php in following way:

$tsql_callsp = "{call spthisiscalled($temp)}"; 

this how created stored procedure in sql server:

create proc spthisiscalled(         @array varchar     )         begin         select something, [@array]         (  .............                                     (........ in                     ([@array]))                     pvt;     end 

i know cannot use array in database , declaring variable varchar in sql server sp (which not make sense). trying find way use output of query q1 (which has different number of elements ouput everythime) in sp parameter. please suggest way so.

thank you


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -