Title: Setting Query Parameters
Last modified: August 21, 2016

---

# Setting Query Parameters

 *  Resolved [rzharding](https://wordpress.org/support/users/rzharding/)
 * (@rzharding)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/setting-query-parameters/)
 * I am trying to run the query **show user** that is supplied with **DBView**.
 * The query is:
 * select ID, user_login, user_email, user_registered, user_status from wp_users
   where ID=%d
 * How do you set the ID parameter?
 * What does the following error mean?
    ‘ID’ is an orphaned PHP snippet. There is
   no matching column name.
 * Are there any hints, tips or other helpful advice on how the php snippets work?
 * Thank you.
 * Richard Harding
 * [https://wordpress.org/plugins/dbview/](https://wordpress.org/plugins/dbview/)

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

 *  Plugin Author [john ackers](https://wordpress.org/support/users/john-ackers/)
 * (@john-ackers)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/setting-query-parameters/#post-4615290)
 * Richard
 * I cannot see ‘show user’ but that doesn’t matter.
 * Those supplied queries were a bit of an afterthought. Some of the queries expect
   parameters and they are passed from one query to another as a GET parameter arg1,
   arg2 etc.
 * If you look at the PHP snippet in the first column in ‘show ten users’, you can
   see
    `DBView::linkToView("[show posts by user $value]","show posts by user", 
   $value);` which passes $value (which happens to be the user ID) as as argument
   to another view ‘show posts by user’. Hope this makes sense. Unfortunately those
   SQL statements with arguments aren’t handled properly when you edit and execute
   them – something i need to fix.
 * You can only use query parameters in the admin/dashboard pages. Have a look at
   [this](http://wordpress.org/support/topic/dbviewlinktoview-message-request-rejected?replies=5).
 * Orphaned PHP snippet error is generated when you modify a query and remove a 
   column name to which you have attached a PHP snippet. It’s just a warning.
 * Sorry the help is a bit limited.
 *  Thread Starter [rzharding](https://wordpress.org/support/users/rzharding/)
 * (@rzharding)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/setting-query-parameters/#post-4615336)
 * Thank you, John. I suspect it will take a bit of learning to fully utilise the
   plugin.
 * Could you explain how I can enter query parameters such as LIKE ‘A%’ from a text
   box or BETWEEN ‘2000-01-01’ AND ‘2000-12-31’?
 * I will look forward to the next release where you can pass arguments to queries
   on public pages.
 * Thank you . . .
 * Richard Harding
 *  Plugin Author [john ackers](https://wordpress.org/support/users/john-ackers/)
 * (@john-ackers)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/setting-query-parameters/#post-4615339)
 * I think i understand what you want to do. It would not be easy to feed the value
   of a text box into the query!
 * Perhaps in a future version I should add an optional query or all column search
   box.
 *  Thread Starter [rzharding](https://wordpress.org/support/users/rzharding/)
 * (@rzharding)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/setting-query-parameters/#post-4615355)
 * Thank you. That would be great.
 * Richard Harding
 *  Plugin Author [john ackers](https://wordpress.org/support/users/john-ackers/)
 * (@john-ackers)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/setting-query-parameters/#post-4615428)
 * You can pass arguments to queries on public pages in 0.5.5 (and jump from one
   table to another).

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

The topic ‘Setting Query Parameters’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/dbview.svg)
 * [dbview](https://wordpress.org/plugins/dbview/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/dbview/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/dbview/)
 * [Active Topics](https://wordpress.org/support/plugin/dbview/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dbview/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dbview/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [john ackers](https://wordpress.org/support/users/john-ackers/)
 * Last activity: [11 years, 12 months ago](https://wordpress.org/support/topic/setting-query-parameters/#post-4615428)
 * Status: resolved