Title: Query option in Plugin
Last modified: August 21, 2016

---

# Query option in Plugin

 *  [anespa](https://wordpress.org/support/users/anespa/)
 * (@anespa)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/query-option-in-plugin/)
 * Dear Claudio,
    I have a question regarding the Query management in WPBI plugin.
   Is it support “Prepared statement” for select Query? I need that option to make
   the chart dynamic according to the filter option selected by the viewer. Please
   reply with a solution idea.
 * Thanks,
    Anes
 * [http://wordpress.org/plugins/wp-business-intelligence-lite/](http://wordpress.org/plugins/wp-business-intelligence-lite/)

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

 *  [claudio](https://wordpress.org/support/users/calberti/)
 * (@calberti)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/query-option-in-plugin/#post-4170304)
 * Hi Anes,
    I dont understand what you mean by “prepared statement”. Anyway dynamic
   chart configuration per user’s interaction is not supported at the moment. Unless
   you are modifying the code base. can you please elaborate on what you’re trying
   to achieve?
 *  Thread Starter [anespa](https://wordpress.org/support/users/anespa/)
 * (@anespa)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/query-option-in-plugin/#post-4170342)
 * Dear Claudio,
    I will explain my doubt, suppose our query that work for a chart
   is **“select name,age from table where region=’Alabama'”** in that query when
   user need data of “Kentucky” region , do we can add an option in query to change
   the region as “Kentucky” from user view . Reply with your idea.
 * Thanks,
    Anes
 *  [claudio](https://wordpress.org/support/users/calberti/)
 * (@calberti)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/query-option-in-plugin/#post-4170417)
 * Hi Anes,
    currently when you load a page with the chart some placeholders in 
   the query are replaced with actual values. For example you can create a query
   using {{{userID}}} and this will be replaced by the actual userID when loading
   the page. This will enable user-specific charts. On the other hand if you want
   to dynamically change the structure of a chart you need to completely change 
   how the charts are created. This can probably be done using AJAX calls that refresh
   the displayed data. To do so you need to: 1) create an API to be called and retrieve
   the data 2) create on the client side an ajax event that calls this service 3)
   dynamically update using JS the placeholder with the data. For example in this
   example [http://www.wpbusinessintelligence.com/line-chart/](http://www.wpbusinessintelligence.com/line-chart/)
   you need to update the content of nvd3Data_ph_Stocks_Multiline
 * This is quite a heavy change in the plugin and will require some work.
    I hope
   this helps regards, Claudio

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

The topic ‘Query option in Plugin’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-business-intelligence-lite_eae8f9.
   svg)
 * [WP Business Intelligence Lite](https://wordpress.org/plugins/wp-business-intelligence-lite/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-business-intelligence-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-business-intelligence-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-business-intelligence-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-business-intelligence-lite/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [claudio](https://wordpress.org/support/users/calberti/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/query-option-in-plugin/#post-4170417)
 * Status: not resolved