Fixing hardcoded queries that are MySQL specific.
Merge pull request #12 from halkyon/hardcoded_queries

Fixing hardcoded queries that are MySQL specific.