I am using wordpress code to query results from my database:
$query = $wpdb->get_results("SELECT pic0,bio,url,site,applet FROM ".$table." WHERE $condition"); // this code returns an array.
Is there a way to merge two or multiple query results in the $query array?
I have tried this:
$query = array();
$query = $wpdb->get_results("query 1");
$query = $wpdb->get_results("query 2");
And its not working.
You were actually pretty close, because you set
$queryagain, you’ve actually overridden the variable, instead, you should add to it, there are 2 ways of doing so:Or the shorter version: