print_error();
}

echo ‘After global $wpdb’;

$idrange = 0;

$query = ‘SELECT * FROM members’;

$contacts = $wpdb->get_results( $query);

$wpdb->print_error();

echo ‘After print_error()’;

if (!$contacts){
$result = ‘error’;
$message = ‘query error’;
echo ‘

contacts error ‘ .$contacts. ‘

‘;
} else {
$result = ‘success’;
$message = ‘query success’;
echo ‘

message -‘ .$message. ‘

‘;

foreach ( $contacts as $contact){
$mysql_data[‘first_name’] = $contact->first_name;
$mysql_data[‘middle_name’] = $contact->middle_name;
$mysql_data[‘last_name’] = $contact->last_name;
$mysql_data[’email’] = $contact->email;
$mysql_data[‘cell_phone’] = $contact->cell_phone;
$mysql_data[‘city’] = $contact->city;
$mysql_data[‘state’] = $contact->state;
$mysql_data[‘zip’] = $contact->zip;

echo ‘

first name again -‘ .$mysql_data[‘first_name’]. ‘

‘;

}
}

?>