/**
  *  Format the result of DB query into array
  *	
  *	(@see get_attribute)
  *	
  *	@private
  *	@param	DB_Result	$res		result of DB query
  *	@param	string		$origin		
  *	@return mixed				see above
  */
 function get_attrib_format_output(&$res, $origin)
 {
     if ($res->numRows() > 1) {
         $out = array('value' => array(), 'origin' => $origin);
         while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {
             $out['value'][] = $row['value'];
         }
         return $out;
     }
     if ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {
         return array('value' => $row['value'], 'origin' => $origin);
     }
     return null;
 }