title: MySQL select 9 random and 1 defined record
body: <p>My question is pretty straightforward, how do I select 9 random records and one defined record in the same SQL statement? All I can think of so far is this, which only returns the one partner record (the defined one) but not the other 9 random ones.</p>
  
  <pre><code>$sql2 = "SELECT * FROM table WHERE filename = '$partn' AND filename != '$x' ORDER BY RAND() LIMIT 10";
  </code></pre>
  
  <p>To elaborate, I need ten records to be returned, none of then should be '$x', one of them should be '$partn' and then 9 other random ones, they all need to be displayed in a random order.</p>
  
  <p>Any help would be appreciated!:)</p>