WordPress.org

Ready to get started?Download WordPress

Forums

Problem with database table names (4 posts)

  1. wxgal
    Member
    Posted 10 years ago #

    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
    My modified index template is here:
    http://www.wxgalsworld.com/journal/index.php
    Does anyone have any ideas as to why this is happening?

  2. wxgal
    Member
    Posted 10 years ago #

    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.

  3. wxgal
    Member
    Posted 10 years ago #

    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.

  4. davidchait
    Member
    Posted 10 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.