plugin code is pulling information from database in one instance and not in other. What is wrong?

In general, I’d recommend to read about $wpdb in detail in the Codex.

Some notes:

  1. Never use the default wp_ prefix.
  2. Never set a hard coded prefix. It will be set during installation and should later be added using $wpdb->prefix. But: Prefixes can be changed with the following SQL command.
    "RENAME table wp_posts TO {$wpdb->prefix}posts;"
  3. Normally there’s always a way to get around custom tables. CPTs and Custom Taxonomies are just an example.