Error thrown with multiple parameters in the API
Issue #21
resolved
Get an error when we send multiple parameters to the API
[30/Jul/2013 15:38:11] "GET /analysis/data/query/json?users=dtreering¶meters=Chloride&start_date=1999-08-18&end_date=2001-06-18&agencies=MWRD¶meters_text=None HTTP/1.1" 200 23848
getting options for Chloride
getting options for Cyanide
[30/Jul/2013 15:39:06] "GET /analysis/data/parameters/query/options?parameters=Chloride|Cyanide HTTP/1.1" 200 23613
executing the get_data_json method
{'users': u'dtreering', 'end_date': u'2001-06-18', 'parameters_text': u'None', 'agencies': u'MWRD', 'parameters': u'Chloride|Cyanide', 'start_date': u'1999-08-18'}
SELECT * FROM cacw_all_data WHERE (date between '1999-08-18' AND '2001-06-18') AND OR systematicname='Chloride'systematicname='Cyanide' AND importedby='dtreering' AND name='MWRD'
there was an error when attempting to get all of the data: syntax error at or near "OR"
LINE 1: ...(date between '1999-08-18' AND '2001-06-18') AND OR systema...
^
Comments (2)
-
reporter -
reporter - changed status to resolved
Resolved with commit 13ba61e
- Log in to comment
Offending block of code is in analysistool>db_utils.py lnes 368-375
BUT that still doesn't build the query correctly: