How is it possible to implement a variable in my Sql Plugin?

Deleted user February 20, 2013

Hi all,

probably it's simple but I want to implement variables in my SQL-String. I use the SQL Plugin.

For example:

$example

Select * from test where test_id = $example

How is it possible?

1 answer

0 votes
C_ Faysal
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 20, 2013

hi andreas,

i've never used sql-plugin and i really don't know exactly what you mean but by lookin at your example code $example would be empty unless it is defined with something like:

example="some_value"
example=$1 (this would be the first argument)
example=$(put your code here)

once this variable is defined you should be able to call $example for your query

Deleted user February 24, 2013

Hey there

and thanks for your answer. When you create a global template you can create textboxes by declaring a variable with the "$" sign.

So if you type something into the created textbox you can use the input text as a variable.

So my question is: "How can I use the text from the textbox as a variable in my sql string?"

Hope this makes clearer what I want to do.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events