Title: Argument in SQL
Last modified: September 12, 2026

---

# Argument in SQL

 *  [kostas45](https://wordpress.org/support/users/kostas45/)
 * (@kostas45)
 * [1 week, 4 days ago](https://wordpress.org/support/topic/argument-in-sql/)
 * Hello,
 * I have a SQL, something like this:
 *     ```
       ...WHERE p.post_type = 'myposttype'
           AND g.ID = 'arg1'...
       ```
   
 * arg1 is a number, it is the ID of another custom post type. If I replace with
   the actual ID, query works fine.
 * How should I reference this in the SQL and in the shortcode?
    These do not work:
   SQL: `...AND g.ID = {arg1}...` In a page: `[gvn_schart_2 id="605" arg1="41"]`
 * Please check it out,
 * Thank you,
    Kostas

Viewing 1 replies (of 1 total)

 *  Plugin Author [Elvin Haci](https://wordpress.org/support/users/elvinhaci/)
 * (@elvinhaci)
 * [1 week, 4 days ago](https://wordpress.org/support/topic/argument-in-sql/#post-19018299)
 * Hi, thank you for the next report.
 * All these minor bugs came after major upgrade we made in 3.0.0. We rewrote some
   blocks from scratch which brought such exceptions. Anyway, we think we are close
   to get stable state.
 * Today you will see an update with fixes.

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fargument-in-sql%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/sql-chart-builder/assets/icon-256x256.png?rev=2343690)
 * [SQL Chart Builder](https://wordpress.org/plugins/sql-chart-builder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sql-chart-builder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sql-chart-builder/)
 * [Active Topics](https://wordpress.org/support/plugin/sql-chart-builder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sql-chart-builder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sql-chart-builder/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Elvin Haci](https://wordpress.org/support/users/elvinhaci/)
 * Last activity: [1 week, 4 days ago](https://wordpress.org/support/topic/argument-in-sql/#post-19018299)
 * Status: not resolved