Using ORDER BY-query with generic results
-
Hi *,
I am trying to sort a table from my wordpress plugin with this query:
global $wpdb; $table_name = $wpdb->prefix . 'mytablename'; $myentries = $wpdb->get_results("SELECT * FROM $table_name ORDER BY date DESC");
But the “ORDER BY” seems to have no effect. It is still sorted last in first out (by id). Is there something that I’m overlooking in the documentation ?? -> https://codex.www.ads-software.com/Class_Reference/wpdb#SELECT_Generic_Results
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Using ORDER BY-query with generic results’ is closed to new replies.