Title: Database error in multisite
Last modified: November 2, 2021

---

# Database error in multisite

 *  Resolved [Ashley](https://wordpress.org/support/users/nosegraze/)
 * (@nosegraze)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/database-error-in-multisite/)
 * When installed on multisite, there’s a database error from this file:
 * libs/sfmBasicActions.class.php
 * > WordPress database error Table ‘database.wp_339_users’ doesn’t exist for query
   > select p.post_author,u.user_login from wp_339_posts p LEFT JOIN wp_339_users
   > u on p.post_author=u.ID where p.post_status=”publish” and p.post_type=”post”
 * Caused by this query:
 * `$wp_authors=$wpdb->get_results('select p.post_author,u.user_login from '.$wpdb-
   >prefix.'posts p LEFT JOIN '.$wpdb->prefix.'users u on p.post_author=u.ID where
   p.post_status="publish" and p.post_type="post"',ARRAY_A);`
 * Here is the fix:
 * `$wp_authors=$wpdb->get_results('select p.post_author,u.user_login from '.$wpdb-
   >posts.' p LEFT JOIN '.$wpdb->users.' u on p.post_author=u.ID where p.post_status
   ="publish" and p.post_type="post"',ARRAY_A);`
 * I switched to using `$wpdb->posts` and `$wpdb->users`, which handles correct 
   table names in multisite.

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

 *  Plugin Author [Nick](https://wordpress.org/support/users/d4d5bh6/)
 * (@d4d5bh6)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/database-error-in-multisite/#post-15029225)
 * Thanks a lot for reporting this Ashley, we’ll investigate.
 *  Plugin Author [Nick](https://wordpress.org/support/users/d4d5bh6/)
 * (@d4d5bh6)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/database-error-in-multisite/#post-15029398)
 * Fixed and new version released. Thanks for reporting it Ashley!
 *  Thread Starter [Ashley](https://wordpress.org/support/users/nosegraze/)
 * (@nosegraze)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/database-error-in-multisite/#post-15029403)
 * Brilliant, thanks [@d4d5bh6](https://wordpress.org/support/users/d4d5bh6/)!

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

The topic ‘Database error in multisite’ is closed to new replies.

 * ![](https://ps.w.org/feedburner-alternative-and-rss-redirect/assets/icon-128x128.
   png?rev=2264885)
 * [RSS Redirect & Feedburner Alternative](https://wordpress.org/plugins/feedburner-alternative-and-rss-redirect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/feedburner-alternative-and-rss-redirect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/feedburner-alternative-and-rss-redirect/)
 * [Active Topics](https://wordpress.org/support/plugin/feedburner-alternative-and-rss-redirect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/feedburner-alternative-and-rss-redirect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/feedburner-alternative-and-rss-redirect/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Ashley](https://wordpress.org/support/users/nosegraze/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/database-error-in-multisite/#post-15029403)
 * Status: resolved