• 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)
  • 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

    (@amory)

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Returning mysql table data’ is closed to new replies.