get_results( "SELECT id, name FROM wp_bp_groups"); /*mulitple row results can be pulled from the database with get_results function and outputs an object which is stored in $result */
//echo "
"; print_r($result); echo "
";
/* If you require you may print and view the contents of $result object */
//echo "A list of group activities"
";
foreach($result as $row)
{
echo $row->id." ".$row->name."
";
}
/* Print the contents of $result looping through each row returned in the result */
?>