Title: Using database table fields on page
Last modified: August 20, 2016

---

# Using database table fields on page

 *  [learningwp256](https://wordpress.org/support/users/learningwp256/)
 * (@learningwp256)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/using-database-table-fields-on-page/)
 * I am new to WordPress and was wondering if someone could point me in the right
   direction. I want to add a table to the wordpress database and use the values
   from 1 row (15 – 20 fields) on a page. I will have probably have 400-500 rows
   of data in the table that will update monthly through an import. I think I understand
   how to query the database but I don’t know the best way to actually get the values
   on a page.
 * I see mention of plugins, shortcodes, custom fields, and page templates. The 
   pages aren’t going to be exactly the same for all 400 – 500 items from the table
   in the database. On one page I might use 10 fields and another I might use 15.
   I would like to query the record one time and then use the fields in the body
   of the page.
 * What is the best method? I link to a tutorial or book would be great. I can research
   and learn, but I just need to know where to start.
 * Thanks!

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/using-database-table-fields-on-page/#post-3559061)
 * This is something that would all be contained in a plugin. On activation, use
   $wpdb methods to create the table. You would also create one or more page templates
   to display the data. To import the data, I would use the [Administration Menus](http://codex.wordpress.org/Administration_Menus)
   system to add a settings page that contains the file selection form. The form
   would post to a php page that would step through the file and insert the data
   in the table.
 * You’ll find adequate information just by searching the Codex, but documentation
   will range from very good to extremely sparse. In some instances, even non-existent.
   When you feel baffled by something, a general internet search can turn up some
   excellent resources, YMMV. And there’s always this sub-forum, which is pretty
   variable also. Considering everyone involved is volunteering their time, it’s
   all pretty amazing actually.

Viewing 1 replies (of 1 total)

The topic ‘Using database table fields on page’ is closed to new replies.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/using-database-table-fields-on-page/#post-3559061)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
