I recently had to do something like this for a mod I wrote and have been using for years . The basic flow is:1. create the list (in ost admin panel, or manually, or script it) the list name is stored in ost_list. note the id.2. connect to your second DB query and get your locations.3. make 1 entry per location in ost_list_items to the list you made in 1. This will populate the list. This will not add location information to already existing tickets.4. Go into osTicket and go to admin panel -> manage -> forms. Choose which built in form you want the data associated with. (so far most of my custom forms have gone in "Ticket Details"). Enter a label (Location), in type pick the list you made in step 1 (locations). Check the Required box. in Variable type "location".4A (optional). drag your new form field up above "Issue Summary". This will make the drop down box appear when opening the ticket before the title subject field.5. hit save changes at the bottom of the page.This will make the drop down appear in the ticket details section of your ticket and people will pick a location when they open new tickets.