Title: Code help for new plugin
Last modified: August 19, 2016

---

# Code help for new plugin

 *  [Derek Ashauer](https://wordpress.org/support/users/sccr410/)
 * (@sccr410)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/code-help-for-new-plugin/)
 * I’m working on a new plugin, but keep running into an issue of not having access
   to the database. I have a second file which also needs access to the database–
   in order for this plugin to work this file needs to be standalone. What files
   do I need to include to get access to the query fuctions?

Viewing 1 replies (of 1 total)

 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/code-help-for-new-plugin/#post-673466)
 * By including the wp-config.php file, you can access the database using WP’s built-
   in query functionality (i.e. $wpdb->get_results(), etc.). Just about all the 
   internal functions, classes and so on should be made available this way.

Viewing 1 replies (of 1 total)

The topic ‘Code help for new plugin’ is closed to new replies.

## Tags

 * [query](https://wordpress.org/support/topic-tag/query/)

 * 1 reply
 * 2 participants
 * Last reply from: [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * Last activity: [18 years, 5 months ago](https://wordpress.org/support/topic/code-help-for-new-plugin/#post-673466)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
