WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] WordPress database error: [Table doesn’t exist]

[Resolved] WordPress database error: [Table doesn’t exist]

  • 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!

Viewing 5 replies - 1 through 5 (of 5 total)
  • 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.

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

    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.

    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’)”

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] WordPress database error: [Table doesn’t exist]’ is closed to new replies.