Title: SQL query with WP user email
Last modified: October 6, 2017

---

# SQL query with WP user email

 *  Resolved [mondellopaese](https://wordpress.org/support/users/mondellopaese/)
 * (@mondellopaese)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/sql-query-with-wp-user-email/)
 * hi,
 * thanks for your work,
 * I need to create a query with a field aligned to the user wp account email:
 * [gdoc key=”wordpress” query=”SELECT nome AS ‘Nome ambiente’, ardu_user AS ‘Arduino
   name’ FROM app_ambiente2 WHERE user_email = $WORDPRESS_EMAIL “]
 * $WORDPRESS_EMAIL should be the email associated to the current logged user (get
   from wordpress),
 * thanks a lot!!
    Andrea

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

 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/sql-query-with-wp-user-email/#post-9563674)
 * As the Readme says:
 * > `gdoc_query` – Filters the Google Visualization API query language query. The
   > first argument is the string supplied to the query attribute, or false if no
   > query was supplied. The second argument is an array of all the attributes and
   > their values passed to the current invocation of the shortcode.
   > A common use case for this filter is to query a Google Spreadsheet using dynamically
   > generated content, such as the email address or username of a logged-in user.
 *  [appurox](https://wordpress.org/support/users/appurox/)
 * (@appurox)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/sql-query-with-wp-user-email/#post-9738070)
 * Hi,
    How do i use Shortcode of gdoc_query to filter content of my inline googlesheet
   for loggedin user only using email. I just want to show content of my spreadsheet
   to logged in user of my wordpress site with respect to their email id. Please
   help as soon as possible
 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/sql-query-with-wp-user-email/#post-9849055)
 * Sigh.
 * [https://wordpress.org/support/topic/qdoc-query-under-other-notes-bottom-of-screen-example-request/](https://wordpress.org/support/topic/qdoc-query-under-other-notes-bottom-of-screen-example-request/)

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

The topic ‘SQL query with WP user email’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/inline-google-spreadsheet-viewer.
   svg)
 * [Inline Google Spreadsheet Viewer](https://wordpress.org/plugins/inline-google-spreadsheet-viewer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/inline-google-spreadsheet-viewer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/)
 * [Active Topics](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Meitar](https://wordpress.org/support/users/meitar/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/sql-query-with-wp-user-email/#post-9849055)
 * Status: resolved