Skip to toolbar

Php

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 */

?>

Responses

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.