Request for teacher locations


Permalink 02:34:08 pm, by mholmes, 125 words, 102 views   English (CA)
Categories: Activity log; Mins. worked: 45

Request for teacher locations

JL called asking for a list of the Canadian cities from which teachers have registered. I pulled the XML version of the tg_users table from the server and ran this:

let $tables := for $t in //table[column[@name='mailingCountry'][normalize-space(upper-case(.)) = 'CANADA']] return $t
let $addresses := for $t in $tables return normalize-space(upper-case(concat($t/column[@name='mailingCity'], ', ', $t/column[@name='mailingState'])))
let $uniqueAddresses := distinct-values($addresses)
let $orderedAddresses := for $u in $uniqueAddresses order by $u return $u
return string-join($orderedAddresses, '

to get a quick-and-dirty list of city, province. I had to search-and-replace some ugly character encoding issues -- the db thinks it has UTF-8 but the data coming in has obviously been 8859-1. Sent the results to JL.


No Pingbacks for this post yet...

Canadian Mysteries

The Canadian Mysteries site consists of a production site containing 12 mysteries, a containing shell and 30 mysteryquests; and a database-driven development site. HCMC took over tech support in summer 08. This blog documents work done on the site from Sept 08. Earlier work is documented in the depts blog in posts prepended with CanMys


XML Feeds