Title: Returning mysql table data
Last modified: August 18, 2016

---

# Returning mysql table data

 *  [amory](https://wordpress.org/support/users/amory/)
 * (@amory)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/returning-mysql-table-data/)
 * What i have done is create four extra inputs within the write>post form for a
   bike club’s website that I’m creating (ride distance, location, contact info,
   and departure time). I have everything running successfully, in that when i publish
   a post, the values for the four new inputs are being stored in separate places
   within mysql.
 * Not being too knowledgeable with PHP, let alone mysql, I’m susprised i was able
   to get that far. Now, however i can’t return the values within each post. I don’t
   need to manipulate the data at all, simply output it. I have looked at many plugins,
   as well as the template-functions-post.php file to get an idea as to how to go
   about this and have failed in all attempts. Can anyone could give me a basic 
   example function of how to return data from a specifc table?

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

 *  [ColdForged](https://wordpress.org/support/users/coldforged/)
 * (@coldforged)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/returning-mysql-table-data/#post-191600)
 * Did you make new columns in the wp_posts table? If so, you’re in luck, because
   columns in the wp_posts table are automatically populated in The Loop, and you
   can access them by simply doing this:
 * `<?php echo $post->my_column_name; ?>`
 * If you didn’t make new columns in the wp_posts table… why don’t you? 😉
 *  Thread Starter [amory](https://wordpress.org/support/users/amory/)
 * (@amory)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/returning-mysql-table-data/#post-191626)
 * Thanks!

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

The topic ‘Returning mysql table data’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [amory](https://wordpress.org/support/users/amory/)
 * Last activity: [21 years, 1 month ago](https://wordpress.org/support/topic/returning-mysql-table-data/#post-191626)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
