Correct sql query for application parameters (refs #4087)
Merge pull request #56 from thingthing/1.0-I3980

Correct sql query for application parameters (closes #4087)