Using url query params in SQL queries

Vince Allen April 19, 2015

Is it possible to use url query parameters in SQL query? For example, I'd like to pass an id to a page and execute the following sql.

SELECT * FROM Projects WHERE id = '$id'

2 answers

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
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.
April 19, 2015
0 votes
Ben Stuart
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 19, 2015

Hey Vince,

Are you trying to  find what project is associated with an ID? 

This query worked for me in SQL workbench: SELECT * FROM <dbName>.project WHERE id = 21

Regards,
Ben Stuart

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events