Title: How to retrieve data from database with shortcode?
Last modified: August 20, 2016

---

# How to retrieve data from database with shortcode?

 *  [Zebra10](https://wordpress.org/support/users/zebra10/)
 * (@zebra10)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/how-to-retrieve-data-from-database-with-shortcode/)
 * I would like retrieve data from a mysql database table, by using shortcode with
   attributes.
 * My database table is named “Prices” and contains these fields “Item”, “Price1”,“
   Price2” and “Price3”.
 * The function of the shortcode should be like this:
    [Item1 attribute=”Price1″]
   should show Price1 of Item 1. [Item2 attribute=”Price3″] should show Price3 of
   Item 2 etc. etc.
 * I this possible (I´m a newbie in this game)?
    If possible, how should the code
   for this be?
 * Hope somebody can give me some hints for this.
 * Regards Brian

Viewing 1 replies (of 1 total)

 *  Thread Starter [Zebra10](https://wordpress.org/support/users/zebra10/)
 * (@zebra10)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/how-to-retrieve-data-from-database-with-shortcode/#post-2257582)
 * Any tips for this, or maybe where to find some info on the subject?
 * /Brian

Viewing 1 replies (of 1 total)

The topic ‘How to retrieve data from database with shortcode?’ is closed to new 
replies.

## Tags

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

 * 1 reply
 * 1 participant
 * Last reply from: [Zebra10](https://wordpress.org/support/users/zebra10/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/how-to-retrieve-data-from-database-with-shortcode/#post-2257582)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
