I think I understand what you are trying to do: select 4 records at random, then sort that result set by the DisplayOrder field. Here's how you would do that. First thing is to grab 4 random records. You can do this with your query like this: $sql_query = "SELECT * FROM mod_en WHERE StartDate <...