Title: WordPress database error: [Table doesn&#8217;t exist]
Last modified: August 18, 2016

---

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

 *  Resolved [nicoleross](https://wordpress.org/support/users/nicoleross/)
 * (@nicoleross)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/wordpress-database-error-table-doesnt-exist/)
 * When I tried to use an include to another database on my side bar (it is the “
   exits”) at [http://nicscribe.net](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)

 *  [emurlee](https://wordpress.org/support/users/emurlee/)
 * (@emurlee)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/wordpress-database-error-table-doesnt-exist/#post-270030)
 * I’m having this problem also, except I’m trying to generate a random quote with
   the PHPQuote program from [http://www.codegrrl.com](http://www.codegrrl.com) .
   WordPress is installed here: [http://route59.org/WordPress](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.
 *  [jaseone](https://wordpress.org/support/users/jaseone/)
 * (@jaseone)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/wordpress-database-error-table-doesnt-exist/#post-270031)
 * Well what does your include look like? what exactly are you trying to do?
 *  [emurlee](https://wordpress.org/support/users/emurlee/)
 * (@emurlee)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/wordpress-database-error-table-doesnt-exist/#post-270035)
 * 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.
 *  [emurlee](https://wordpress.org/support/users/emurlee/)
 * (@emurlee)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/wordpress-database-error-table-doesnt-exist/#post-270036)
 * 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’)”
 *  [catfishvina](https://wordpress.org/support/users/catfishvina/)
 * (@catfishvina)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/wordpress-database-error-table-doesnt-exist/#post-270104)
 * im soo too
    help me now pl? [http://www.members.lycos.co.uk/catfishvina/wordpress](http://www.members.lycos.co.uk/catfishvina/wordpress)
   help

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

The topic ‘WordPress database error: [Table doesn’t exist]’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)
 * [tables](https://wordpress.org/support/topic-tag/tables/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 4 participants
 * Last reply from: [catfishvina](https://wordpress.org/support/users/catfishvina/)
 * Last activity: [20 years, 7 months ago](https://wordpress.org/support/topic/wordpress-database-error-table-doesnt-exist/#post-270104)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
