title: PHP Array as input to Stored Procedure
body: <p>This is what i am doing now : -  in PHP</p>
  
  <pre><code>foreach($array as $value)
  {
  $query = select abc from tblname where colname =" .$value.
  // fire query
  }
  </code></pre>
  
  <p>then i create array of these values and display accordingly.</p>
  
  <p>The PROBLEM:  -</p>
  
  <p>I have applied foreach, which fires the query every time it encounters a value in the array.
  result, if i have 10 values in my array it fires 10 queries. and uses network 10 times, result slow output.</p>
  
  <p>What i want - </p>
  
  <p>I want to give the array to a stored procedure which shall give me a resultset which will have the outputs corresponding to all the elements in the array.</p>
  
  <p>I know this can be done but do not know how.
  the mysql doesnot take arrays as datatype.</p>
  
  <p>the result shall be that network shall be used only once, despit of any number of values in the array.</p>
  
  <p>LIKE - </p>
  
  <pre><code>StoredProcedure(inputMysqlARRAY)   // not possible, need a workaroung
  {
  // fire simple select(same) query for each value.
  }
  </code></pre>
  
  <p>then call this stored procedure from PHP and input array. // need workaround.</p>