Title: SQL wp_db plus external db
Last modified: August 19, 2016

---

# SQL wp_db plus external db

 *  Resolved [dallholio](https://wordpress.org/support/users/dallholio/)
 * (@dallholio)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/sql-wp_db-plus-external-db/)
 * I’m integrating external php files which use a separate database.
 * So in my various files, I’m including the external database connect string. I
   don’t have any problem pulling in current user data to these files, but I want
   to query the wp_users table with SQL as well.
 * it appears that I don’t have access to the wp_users table as my connect string
   for the other database has knocked it out.
 * Anyone tried to do the same ?

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

 *  [stvwlf](https://wordpress.org/support/users/stvwlf/)
 * (@stvwlf)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/sql-wp_db-plus-external-db/#post-881724)
 * If you are wanting to run queries directly on the WordPress database, there is
   a specific way you must do it from within WordPress. See this page: [http://codex.wordpress.org/wpdb](http://codex.wordpress.org/wpdb)
 *  Thread Starter [dallholio](https://wordpress.org/support/users/dallholio/)
 * (@dallholio)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/sql-wp_db-plus-external-db/#post-881901)
 * Thanks for your help. it took me a while to sort it but that was just what i 
   needed.
 * Integrating with ease now.

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

The topic ‘SQL wp_db plus external db’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [dallholio](https://wordpress.org/support/users/dallholio/)
 * Last activity: [17 years, 6 months ago](https://wordpress.org/support/topic/sql-wp_db-plus-external-db/#post-881901)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
