$wpdb->get_row() only returns a single row?

Why is it? I tried the same query in the console and it returned multiple rows. Here’s the query:

$this->wpdb->get_row("SELECT * FROM ".$this->wpdb->users." WHERE status="active"", ARRAY_A);

It keeps returning the same single row when there are several active users. Am I missing something?


Indeed, use get_row() only when you expect to get one result, else you can use get_results()

Leave a Comment