title: Create mutually exclusive image slideshow (two images shown at same time, cannot ever be same)
body: <p>Thanks for helping in advance.  This is a similar question asked by someone else recently, (<a href="https://stackoverflow.com/questions/23214561/random-switch-statment-improvements">Random Switch Statement Improvements?</a>) but the solutions provided over there did not do the trick for me.  </p>
  
  <p>In case you don't feel like going to that page, here's the problem.  I have a 2 slideshow images, one on top of the other.  I want those images to never be the same, either on page load or as the slideshow shuffles through for infinity.  </p>
  
  <p>I've tried adding</p>
  
  <pre><code>"ORDER BY rand() LIMIT 2"
  </code></pre>
  
  <p>and that only made the slideshow images disappear.  </p>
  
  <p>Here's the code: </p>
  
  <pre><code>$getRugInfo = "SELECT f_name, l_name, city, zipcode, dfd.name as state_id, rug_types, profile_photo, profile_url, prt.rating  FROM rug_owners ps 
  left join rug_states pst on dfd.state_id = ps.state_id left join rug_reviews 
  prt on dfd.user_id = ps.user_id  WHERE promoted_rug = 1 ORDER BY ";  
  
  
  $range_values = range(1,6);
  shuffle($range_values);
  $pickRug=array_pop($range_values);
  
   // I tried doing the code above, but it did not make the slideshow images mutually exclusive.  THe same two images would show up on occasion.  
  
  $pickRug = mt_rand(1, 5);
  
  switch($pickRug) {
  case 1:
      $getSliderInfo .= "f_name";
      break;
  case 2:
      $getSliderInfo .= "l_name";
       break;
  case 3:
      $getSliderInfo .= "city";
      break;
  case 4:
      $getSliderInfo .= "profile_photo";
      break;
  case 5:
      $getSliderInfo .= "city DESC";
      break;
  }
  
  $sliderResult = mysql_query($getSliderInfo); // calls the slideshow
  
  $link_address = $row["profile_url"];
  </code></pre>
  
  <p>Then it is the same thing as above for the second slideshow image (the image on bottom)</p>
  
  <p>Here is the Jquery to create the slideshow: </p>
  
  <pre><code> &lt;script&gt;
      jQuery('#Slider').cycle({ 
      fx:     'fade', 
      speed: 3000
  });
      jQuery('#Slider2').cycle({ 
      fx:     'fade', 
      speed: 3000
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Again, it's basically the same problem the other person had in the link provided above, it's just that the solutions provided did not work.`  </p>