Title: Get data from database for a widget
Last modified: April 27, 2017

---

# Get data from database for a widget

 *  [namrata26](https://wordpress.org/support/users/namrata26/)
 * (@namrata26)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/get-data-from-database-for-a-widget/)
 * I am using rss-just-better plugin, I want to fetch the results from database 
   that are stored for the widget of this particular plugin, I am able to see the
   data in wp_options table for widget_rs-just-better plugin in option_name, but
   the data is stored for the plugin is serialized in the table, I want to fetch
   the filters that I have specified in the widget and send the filters over the
   API for mobile.Please hep me out to fetch the url and filters specified in the
   plugin widget

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

 *  [karimeo](https://wordpress.org/support/users/karimeo/)
 * (@karimeo)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/get-data-from-database-for-a-widget/#post-9074786)
 * Hello,
 * The get_option() function might be what you’re looking for. [https://developer.wordpress.org/reference/functions/get_option/](https://developer.wordpress.org/reference/functions/get_option/)
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/get-data-from-database-for-a-widget/#post-9075991)
 * karimeo is correct, you want get_option(). If you print_r the returned array 
   inside of `<pre>` tags, the array structure and values will be displayed, which
   will indicate how you access your filter and any other values within the array.
    -  This reply was modified 9 years, 1 month ago by [bcworkz](https://wordpress.org/support/users/bcworkz/).
      Reason: pre tag is code
 *  Thread Starter [namrata26](https://wordpress.org/support/users/namrata26/)
 * (@namrata26)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/get-data-from-database-for-a-widget/#post-9076838)
 * Karimeo , bcworkz- thanks for the reply
    I have tried get_option function but
   with get_option(‘widget_rss-just-better’) I get this result “Array ( [_multiwidget]
   => 1 ) null” following is the data , I want to get [http://prntscr.com/f1pqd1](http://prntscr.com/f1pqd1)
   which get_options is not returning, can you please guide me further
    -  This reply was modified 9 years, 1 month ago by [namrata26](https://wordpress.org/support/users/namrata26/).
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/get-data-from-database-for-a-widget/#post-9079472)
 * The ‘a:1:{s:12:”_multiwidget”;i:1;}’ you see is exactly the serialized version
   of ‘array(‘_multiwidget’ => 1,)’ (not sure where the null came from) The data
   you seek must lie elsewhere. Perhaps try searching the values for a string you
   would expect to find. Or search other option keys for ‘%rss-just-better%’ or 
   maybe ‘%rjb%’.
 * Perhaps look through the widget code and see where it is saving the data you 
   provided?
 * Sorry my previous post was mis-formatted. I’ve repaired it, but it probably doesn’t
   matter much at this point.

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

The topic ‘Get data from database for a widget’ is closed to new replies.

## Tags

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

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 4 replies
 * 3 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/get-data-from-database-for-a-widget/#post-9079472)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
