Title: Randomizing Results From WPDB Query
Last modified: August 31, 2016

---

# Randomizing Results From WPDB Query

 *  [Reece](https://wordpress.org/support/users/firstclasscode/)
 * (@firstclasscode)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/randomizing-results-from-wpdb-query/)
 * Hello,
 * I have been trying for hours this morning to get these results randomized with
   no luck. I tried using examples from the Codex, from other support threads,a 
   nd even stackoverflow. I feel like I am missing something simple.
 * I pulled this code from a theme (developers are of no help) and I need to make
   the results random.
 * `return "{$wpdb->postmeta}.meta_value + 0 {$order}, {$wpdb->posts}.post_date 
   DESC";`
 * Any help is appreciated.
    Thanks!

The topic ‘Randomizing Results From WPDB Query’ is closed to new replies.

## Tags

 * [wpdb](https://wordpress.org/support/topic-tag/wpdb/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [Reece](https://wordpress.org/support/users/firstclasscode/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/randomizing-results-from-wpdb-query/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
