title: cannot retrieve the multiple rows from mysql query
body: <p>I am making hotel online order system in php. I am having issue when i have added one item in the cart the original price is 2$ but with that there were 2 more options (1) add cheese (2) add more chicken.</p>
  
  <p>it is showing the main item and price watever it is. But it is showing only one extra option cheese and i have selected both.</p>
  
  <p><strong>fixed it - my updated code is below:</strong></p>
  
  <pre><code>&lt;?php
  $rest_menuC = mysql_query("select * from menu_items where status = 1 order by id");
  while ($mitemC  = mysql_fetch_array($rest_menuC)){
      $mitem_idC  = $mitemC['id'];
      $mitem_enC  = $mitemC['ename'];
      $mitem_anC  = $mitemC['aname'];
      $mitem_fnC  = $mitemC['filename'];
      $mitem_ssC  = $mitemC['status'];
  $order_temp =   mysql_query("select * from temp_cart where item_id = '".$mitem_idC."'  order by id");
  while ($torder = mysql_fetch_array($order_temp)) {
      $prITTD     =   $torder['id'];
      $prITTC     =   $torder['item_id'];
      $prIDTC     =   $torder['price_id'];
      $qtyT       =   $torder['qty'];     
      $pc1        =   $torder['pc1'];
      $pc2        =   $torder['pc2'];
  
  $order_tempCHP      =   mysql_query("select * from choice_price
  WHERE
  id='".$pc1."' OR id='".$pc2."' OR id='".$pc3."' OR id='".$pc4."' OR id='".$pc5."' OR id='".$pc6."' OR 
  id='".$pc7."' OR id='".$pc8."' OR id='".$pc9."' OR id='".$pc10."' OR id='".$pc11."' OR id='".$pc12."'
  AND item_id = '".$prITTC."'");
  $toarder = mysql_num_rows($order_tempCHP);
  while ($torderCP    = mysql_fetch_assoc($order_tempCHP)) {
      $CPid   =   $torderCP['id'];
      $CPenm  =   $torderCP['ename'];
      $CPicd  =   $torderCP['choice_id'];
      $CPitd  =   $torderCP['item_id'];
      $CPlpr  =   $torderCP['price'];
  
  if ($toarder == 1){
  ?&gt;
  &lt;span class="quantity"&gt;&lt;font color="red" style="font-weight:bold;"&gt;Choices # &lt;?php echo $CPicd; ?&gt;&lt;/font&gt;&lt;/span&gt;&lt;br&gt;
  &lt;span class="quantity"&gt; &lt;?php echo $CPenm; ?&gt; # &lt;?php echo $CPlpr; ?&gt;&lt;/span&gt;
  
  &lt;?php }else{ ?&gt;
  
  &lt;span class="quantity"&gt;&lt;font color="red" style="font-weight:bold;"&gt;Choices # &lt;?php echo $CPicd; ?&gt;&lt;/font&gt;&lt;/span&gt;&lt;br&gt;
  &lt;span class="quantity"&gt; &lt;?php echo $CPenm; ?&gt; # &lt;?php echo $CPlpr; ?&gt;&lt;/span&gt;&lt;br&gt;
  &lt;?php } } ?&gt;
  </code></pre>