title: Reading from mysql tables using pandas and named parameters in query
body: <p>I try to execute the following query </p>
  
  <pre><code>SELECT user_id, user_agent_id, requests 
  FROM riskanalysis_user_http_ua_stats
  WHERE since&gt;= :since AND until&lt; :until'
  </code></pre>
  
  <p>I try the following pandas code</p>
  
  <pre><code>sql = 'SELECT user_id, user_agent_id, requests ' \
        'FROM riskanalysis_user_http_ua_stats ' \
        'WHERE since&gt;= :since AND until&lt; :until'
  
  dataframe_records = pd.read_sql_query(sql, engine,
                                        params={'since':datetime_object,
                                                'until':datetime_object}
  </code></pre>
  
  <p>and I get the following error</p>
  
  <pre><code>sqlalchemy.exc.ArgumentError: Could not parse rfc1738 URL from string 'SELECT user_id, user_agent_id, requests FROM riskanalysis_user_http_ua_stats WHERE since&gt;= :since AND until&lt; :until'
  </code></pre>
  
  <p>I am using <code>pymysql</code> as the driver and MySQL database. How do I pass named parameters in an sql query?</p>
  
  <p>EDIT 1: Corrected the parameter order but now I get the following</p>
  
  <pre><code>sqlalchemy.exc.ProgrammingError: (pymysql.err.ProgrammingError) (1064, u"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':since AND until&lt; :until' at line 1") [SQL: 'SELECT user_id, user_agent_id, requests FROM riskanalysis_user_http_ua_stats WHERE since&gt;= :since AND until&lt; :until'] [parameters: {'since': datetime.datetime(2015, 6, 18, 0, 0, tzinfo=tzutc()), 'until': datetime.datetime(2015, 6, 18, 0, 2, tzinfo=tzutc())}]
  </code></pre>