# Variables in a database

**URL:** <https://forum.kirupa.com/t/variables-in-a-database/140037>\
**Category:** Uncategorized\
**Created:** [March 7, 2005, 11:21pm UTC](https://forum.kirupa.com/t/variables-in-a-database/140037 "2005-03-07T23:21:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dreamerp](https://avatars.discourse-cdn.com/v4/letter/d/fbc32d/32.png) [@dreamerp](https://forum.kirupa.com/u/dreamerp)\
**Post date:** [March 7, 2005, 11:21pm UTC](https://forum.kirupa.com/t/variables-in-a-database/140037/1 "2005-03-07T23:21:08Z")

</div>

Hello,  
Is it possible to connect to a database, gather variables, and then have another connection to a database using those variables? Is it possible to have variables in the sql query to SELECT information from a database as well as use variables in the database connection? I tried but it didn’t work, can someone help?

THanks!
