WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WordPress database error: [Table doesn't exist] (6 posts)

  1. nicoleross
    Member
    Posted 8 years ago #

    When I tried to use an include to another database on my side bar (it is the "exits") at http://nicscribe.net, I got the following errors:

    WordPress database error: [Table 'nscribe_links.wp_users' doesn't exist]
    SELECT * FROM wp_users WHERE user_login = 'admin'

    WordPress database error: [Table 'nscribe_links.wp_posts' doesn't exist]
    SELECT COUNT(ID) FROM wp_posts WHERE 1=1 AND post_date_gmt <= '2005-10-09 18:07:59' AND (post_status = "publish")

    WordPress database error: [Table 'nscribe_links.wp_posts' doesn't exist]
    SELECT COUNT(ID) FROM wp_posts WHERE 1=1 AND post_date_gmt <= '2005-10-09 18:07:59' AND (post_status = "publish")

    The first appears on my pages, the second two appear at the end of my actual WP posts. Am I doing something wrong with my include? Thank you!

  2. Emurlee
    Member
    Posted 8 years ago #

    I'm having this problem also, except I'm trying to generate a random quote with the PHPQuote program from http://www.codegrrl.com . WordPress is installed here: http://route59.org/WordPress for now until I can work out all the kinks. Is there a plugin or something I need to install? I've searched this forum top to bottom and can't find any other case like this.

  3. jaseone
    Member
    Posted 8 years ago #

    Well what does your include look like? what exactly are you trying to do?

  4. Emurlee
    Member
    Posted 8 years ago #

    This is my include:
    [code]
    <?php include(ABSPATH . "/home/route59/public_html/PHPQuotes/config.php");
    $result = mysql_query ("SELECT * FROM $table ORDER BY RAND(NOW()) LIMIT 1");

    while ($row = mysql_fetch_array($result))

    {
    echo "<i>" . $row["quote"] . "</i> -- " . $row["author"] . "" ;
    }?>
    [/code]

    The only reason I stuck the ABSPATH . before the file location is because this allowed my sidebar content to show up whereas removing that or putting TEMPLATEPATH . causes errors throughout the sidebar as well. I have a quote database installed on my site, and before, with MT, all I had to do was insert a simple PHP include to call a random quote but WP isn't allowing me to do that.

  5. Emurlee
    Member
    Posted 8 years ago #

    Ok, I just changed my PHP include to:
    [code]
    <?php include(ABSPATH. "wp-quotes.php"?>
    [/code]

    And then within wp-quotes.php I used my original include:

    [code]
    <?php include("/home/route59/public_html/PHPQuotes/config.php");
    $result = mysql_query ("SELECT * FROM $table ORDER BY RAND(NOW()) LIMIT 1");

    while ($row = mysql_fetch_array($result))

    {
    echo "<i>" . $row["quote"] . "</i> -- " . $row["author"] . "" ;
    }?>
    [/code]

    It's still throwing errors:
    "

    WordPress database error: [Table 'route59_PHPQuotes.wp_posts' doesn't exist]
    SELECT COUNT(ID) FROM wp_posts WHERE 1=1 AND post_date_gmt <= '2005-10-11 21:42:59' AND (post_status = "publish" OR post_author = 1 AND post_status != 'draft' AND post_status != 'static')"

  6. catfishvina
    Member
    Posted 8 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic