title: MySQL: How to retrieve a random row or multiple random rows?
body: <p>I have a MySQL database table that stores the URLs of photos. I need to pull 5 random records from the database of a particular type. I can pull 5 records like this:</p>
  
  <pre><code>SELECT Photos.* 
  FROM Photos 
  WHERE Photos.Type_ID = 4 
  LIMIT 5
  </code></pre>
  
  <p>Now I need help trying to figure out how to pull different records every time. How can I retrieve random rows from this result set?</p>