Title: Problem with database table names
Last modified: August 18, 2016

---

# Problem with database table names

 *  [wxgal](https://wordpress.org/support/users/wxgal/)
 * (@wxgal)
 * [21 years, 11 months ago](https://wordpress.org/support/topic/problem-with-database-table-names/)
 * I have recently installed WP 1.2 (I’m moving from MT). I’ve got it all installed
   and working fine with the default templates and styles.
    I have gone to work 
   and changed the layout to match (as closely as possible) my MT layout. The posts
   themselves are showing up fine .. just how they should. But I’m having trouble
   with the sidebar. I’m talking about the links list and the categories list and
   the calendar and the archives (monthly) list. Everything works fine with the 
   original index template. I use the exact same code on my modified index template
   and I get an error stating: Database error: [Table ‘bresler_www.wp_categories’
   doesn’t exist] The actual database table name is “wp_categories”. It’s for some
   reason adding “bresler_www.” to the beginning of it. I have no idea where that’s
   come from. That is the name of another database that I have, but it has nothing
   to do with my WP install. I cannot figure out why this is being added or even
   where it’s being added. It only happens on my modified index template. As far
   as I know, I have left all of the needed code in the template. I just basically
   moved stuff around. You can find the original index template here: [http://www.wxgalsworld.com/journal/index-original.php](http://www.wxgalsworld.com/journal/index-original.php)
   My modified index template is here: [http://www.wxgalsworld.com/journal/index.php](http://www.wxgalsworld.com/journal/index.php)
   Does anyone have any ideas as to why this is happening?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [wxgal](https://wordpress.org/support/users/wxgal/)
 * (@wxgal)
 * [21 years, 11 months ago](https://wordpress.org/support/topic/problem-with-database-table-names/#post-65539)
 * Well, I found part of the problem. I accessed a different database for the weather
   info that I have in the sidebar. I closed that connection, so I’m not getting
   the errors anymore. But it’s not displaying the info either. Still trying to 
   debug.
 *  Thread Starter [wxgal](https://wordpress.org/support/users/wxgal/)
 * (@wxgal)
 * [21 years, 11 months ago](https://wordpress.org/support/topic/problem-with-database-table-names/#post-65542)
 * Well, it’s official. My weather thingy is messing up my sidebar. And the weather
   thing is something I want there. Guess I’m gonna have to figure some way around
   this.
    Boy it’s good to figure out the answers to my own questions. Now if I 
   could just figure out the conflict and resolve it … LOL.
 *  [davidchait](https://wordpress.org/support/users/davidchait/)
 * (@davidchait)
 * [21 years, 11 months ago](https://wordpress.org/support/topic/problem-with-database-table-names/#post-65554)
 * It means that whatever db access is being done after the Weather hack that is
   problematic is NOT passing the originally opened DB handle to the MySQL access
   functions. By default, if no DB handle is supplied, the functions use the last-
   opened db.
    I can’t remember if I fixed this in my code at some point — and to
   that end, can’t remember if I ever looked to see if it was properly handled in
   newer WP versions (I’m still on a 1.0 derivative…). Also, if you want to post‘
   code links’, post them to .phps copies of your code, or we can’t actually see
   the code itself to try to help… 😉 -d [CHAITGEAR](http://www.chait.net)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Problem with database table names’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [davidchait](https://wordpress.org/support/users/davidchait/)
 * Last activity: [21 years, 11 months ago](https://wordpress.org/support/topic/problem-with-database-table-names/#post-65554)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
