using sqlalchemy 0.5.8, mysql 5.1

sql = text('select count(*) from :table)
db.execute(sql, params=dict(table='mytable'))

Results in:
sqlalchemy.exc.ProgrammingError: (ProgrammingError) (1064, "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 ''mytable'' at
line 1") u'select count(*) from %s' ['mytable']

Is mytable being (single) quoted?

How to properly invoke text() for this case?

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to