returning rows from $wpdb - losing my mind <p>spent the last two hours trying to get this $wpdb->get_results to return an array the same way while ($row = mysql_fetch_array($result)) would. I have tried everything, get_col, get_row, etc... went through the wp codex and tried all their examples and literally nothing works. Everything returns either Array ( ) or NULL. I am losing my mind here, any help is GREATLY appreciated.</p> <p>I originally coded this plugin in PDO and then realized wordpress doesn't support that. I am not a fan of wpdb sql. Here it is;</p> <pre><code>$query = $wpdb-&gt;get_results("SELECT * FROM admin WHERE user_id = '$userid'"); foreach ($query as $row) { echo $row-&gt;date; } </code></pre>