title: how to call stored procedure inside for loop
body: <p>i have php code as folloes where i call store procedure inside for loop.But when i execute m getting eror "Commands out of sync; you can't run this command now "
  but if i remove for loop m getting correct result</p>
  
  <pre><code>&lt;?php 
  $sum=0;
  for($i=0;$i&lt;10;$i++){
      $overall_sat=mysql_query("call daily_sales('HO Bangalore','2013-07-01','2013-07-30')");
  
          while($row=mysql_fetch_row($overall_sat)){ echo "&lt;pre&gt;"; print_r($row);?&gt;
              &lt;td&gt;&lt;?php echo $row['0'];
              $sum=$sum+$row['sat'];?&gt;&lt;/td&gt;
          &lt;?}
  }
  if(!$overall_sat){
      echo mysql_error();
  }
  ?&gt;
  </code></pre>