Title: Execute PHP code and MySQL
Last modified: August 30, 2016

---

# Execute PHP code and MySQL

 *  [cyang255](https://wordpress.org/support/users/cyang255/)
 * (@cyang255)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/execute-php-code-and-mysql/)
 * Hi,
 * I was wondering what is the best practices to execute PHP snippet to extract 
   data from MySQL table and displayed in a page?
 * There are so many plugins to do so, but I was wondering which is the prefer way
   and what are the most of people will do for “web applications development” with
   WordPress 4.3?
 * We are going to convert our MODX 1.0 CMS to WordPress 4.3, so I like to figure
   out how to run PHP and access MySQL first. Thanks a lot.
 * Charles

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

 *  [bemdesign](https://wordpress.org/support/users/bemdesign/)
 * (@bemdesign)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/execute-php-code-and-mysql/#post-6537687)
 * To create/edit/delete custom data into or on-top of WordPress, I like to use 
   the Pods Framework plugin: [https://wordpress.org/plugins/pods/](https://wordpress.org/plugins/pods/).
   In your particular case, you may want to consider using it’s powerful Advanced
   Content Types which are entirely separate from WordPress and use their own database
   tables. Do be aware that ACT (Advanced Content Types) can not make use of the
   full WordPress API as they are indeed a stand-alone data “object” external to
   WordPress. Learn more about Pods and how to use it at: [http://pods.io/](http://pods.io/)
 * The other thing to consider when using your own PHP code and database tables 
   is to sanitize and verify everything – you really don’t want to be the target
   or victim of a SQL Injection attack.
 *  Thread Starter [cyang255](https://wordpress.org/support/users/cyang255/)
 * (@cyang255)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/execute-php-code-and-mysql/#post-6537720)
 * Hi bemdesign,
 * I means there are many php plugins, mysql plugins, so I was wondering how would
   other more experiences WordPress developers use? What do you guys use? Does WordPress
   already support them in core? Sorry, I am really new to WP 4.3, so I need to 
   a lot of reading to find out these “basic” stuff.
 * Any suggestions on which plugin to use or API to call is very appreciated. Thanks.
 *  [bemdesign](https://wordpress.org/support/users/bemdesign/)
 * (@bemdesign)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/execute-php-code-and-mysql/#post-6537777)
 * That question is too broad to answer – it is effectively unanswerable because,
   like most code and application development, it all depends. Generally professional
   WordPress development (creating your own code to implement functionality) happens
   through programmers using a code editor/IDE to develop plugins using standard
   computer science and engineering methodology on top of WordPress’ flexible API.
   At a high level, it’s just like development for any other application in any 
   other language.
 * All that being said, I will point you to the WordPress codex [here](https://codex.wordpress.org/Main_Page)
   and the WordPress code reference [here](https://developer.wordpress.org/reference/).
   Read through the codex to get an idea of how WordPress architecturally works 
   and then use the developer code reference to delve into the actual functions,
   classes, methods and hooks used by WordPress.
 * Also I recommend opening up the WordPress core PHP files in your PHP/text editor
   of choice and read through the code which is generally very well documented. 
   Don’t actually edit these files though – it’s always bad practice to edit the
   core files as they will get overwritten in WordPress updates and you’ll lose 
   your changes. Instead make any customizations through a custom plugins or custom
   themes.

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

The topic ‘Execute PHP code and MySQL’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [bemdesign](https://wordpress.org/support/users/bemdesign/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/execute-php-code-and-mysql/#post-6537777)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
