I send request to the Tornado server. Handler looks like:
def myHandler (self, callback): string = self.get_arguments('string', None) query = 'SELECT * FROM table_name WHERE value LIKE \'%s%\'' with self.db.blocking connection as conn: cursor = conn.cursor() cursor.execute (query,[string]) response = cursor.fetchall() callback (response)
It doesn't work. But I try in the terminal: SELECT * FROM table_name WHERE value LIKE \'?%\'; and it works.
So what's wrong in this code?
Source: http://dba.stackexchange.com/questions/33893/tornado-postgresql-python
giuliana and bill bill rancic nflx jennifer hudson chicago blackhawks giuliana rancic giuliana rancic
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.