Title: Using sql data in blog
Last modified: August 19, 2016

---

# Using sql data in blog

 *  Resolved [aftereview](https://wordpress.org/support/users/aftereview/)
 * (@aftereview)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/using-sql-data-in-blog/)
 * I am not sure if this is possible, but my question is, can I use data stored 
   in a database and display it in a table format in a post?
 * If the answer is yes, any advice or examples would be greatly appreciated.
 * Sorin

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

 *  [nsathees](https://wordpress.org/support/users/nsathees/)
 * (@nsathees)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/using-sql-data-in-blog/#post-1447616)
 * it is very much possible. Need more info to help you. is the table created within
   WP database or not. if within WP database then use the wpdb to connect and retrieve
   the data and display as you please!
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/using-sql-data-in-blog/#post-1447646)
 * As nsathees said it’s easier if the tables are in the WordPress database, but
   if not flaminglogos’ info will be of interest:
    [http://wordpress.org/support/topic/307945?replies=8](http://wordpress.org/support/topic/307945?replies=8)
 *  Thread Starter [aftereview](https://wordpress.org/support/users/aftereview/)
 * (@aftereview)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/using-sql-data-in-blog/#post-1447824)
 * Thank you both for the responses, I think I have a starting point now, and it
   looks like I need to do quite a bit more reading.
 * To make things simpler I will use a table in the wp database. My next step is
   to figure out where the php code needs to be to either update the post or make
   the data available to the post. Ideally the table would have selectable field/
   sort by capability.
 * I think one option is to use a special template (I need to read more on this)
   
   Second option could be an addon called phpexec, executing php code embedded in
   the post, I am concerned that this might introduce a security issue.
 * I should note that this is my very first time looking at wordpress so I am slowly
   poking my way through.

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

The topic ‘Using sql data in blog’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [aftereview](https://wordpress.org/support/users/aftereview/)
 * Last activity: [16 years, 1 month ago](https://wordpress.org/support/topic/using-sql-data-in-blog/#post-1447824)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
