Using Drupal 6.10
CCK Content 6.x-2.2
running localhost WAMP
PHP 5

I have content type Degree created with CCK that contains all possible degrees (abbreviation field and description field).

I have content type Education created with CCK that contains the degree, graduation date, and major for the user.

I have put the following code in the Education content type allowed value php code area.. intent is to generate a checkbox list of possible degrees from which the user selects their degree. The widget type is checkboxes/radio buttons.

Here is the code

$degree_list = array();
  $result = db_query('SELECT nid, field_deg_abbrev_value, field_deg_desc_value FROM {content_type_degree} WHERE nid > 0');
  while ($get_degree = db_fetch_array($result)) {
    $degree_list[$get_degree['nid']] = $get_degree['field_deg_abbrev_value'].' -- '.$get_degree['field_deg_desc_value'];
  }
  return $degree_list;

What works:
I can edit the content type and select default values for the variable and I seen all the values from the degree table in addition to the N/A option.
The display of default values does show me info correctly formatted: degree abbreviation -- degree description correctly (e.g., AA -- Associates in Arts)

What fails:
I get the following error code when I try to create the Education content type:
Access denied for user 'ODBC'@'localhost' (using password: NO)

What makes the error go away:
1. removing the phpcode trying to pull values from the cck Degrees table
2. changing the code to use a non cck table.. one that I manually created to test the concept

What obvious nit am I missing?