title: MySQL query with multiple random values but sum always within a range
body: <p>I have a table of store items with their price.
  I'm trying to write a mysql query that pulls a number of items (between 3 and 6) at RANDOM, with the TOTAL value of all items within $20 of a value chosen by the user.</p>
  
  <p>Any idea's on how to accomplish this?
  Thanks in advance!</p>
  
  <p>EDIT*** so far here is what I have. The big issue is that sum(price) takes the sum of ALL items. The secondary issue is having the "LIMIT" be random, but I can eventually have php pick a random number between 3 and 6 prior to running the query.</p>
  
  <pre><code>SELECT item,price,sum(price) 
  FROM items 
  WHERE sum(price) BETWEEN ($value-10) AND ($value+10) 
  ORDER BY rand() LIMIT 6
  </code></pre>