Advertisement
Guest User

Untitled

a guest
Oct 25th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. from sqlalchemy.text import text
  2.  
  3. # Create a database connection called "connection"...
  4.  
  5. q = text('USE :name')
  6. connection.execute(q, name='DATABASE_NAME')
  7.  
  8. "You have an error in your SQL syntax; check the manual that
  9. corresponds to your MySQL server version for the right syntax to use
  10. near ''DATABASE_NAME'' at line 1") [SQL: u'USE %s;'] [parameters:
  11. (u'DATABASE_NAME',)]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement