title: Random Items from Query
body: <p>I have a database with 16000 rows. I want to grab a random 400 rows. </p>
  
  <p>How would I accomplish this task? Would I do it in Sql? Or select all 16000 rows and then dump a random 400 into an array?</p>
  
  <p>I'm new to PHP and programming..</p>
  
  <p>Thanks for any help.</p>
  
  <pre><code>$result = mysql_query ('SELECT * FROM AllImages') or die ('Error query: '.mysql_error ());
  </code></pre>