MysqlDB uses format style bind parameters, i.e. %s. if youd like
SQLAlchemy to convert :c1 to an appropriate bind param for MySQL,
use c.execute(text('select * from t_test where c1=:c1'), {'c1':1}).
On Nov 9, 2007, at 6:56 AM, Bruza wrote:
This is driving me nuts... The very very simple
By using %s, does that mean MySQL does not support binding of
parameter
and will have to pass the entire SQL statement as one text string?
c.execute(select * from t_test where c1=%s % '1234567')
works, but this means the parameter was first substituted into the
query string
(by Python) before
Bruza wrote:
By using %s, does that mean MySQL does not support binding of
parameter
and will have to pass the entire SQL statement as one text string?
c.execute(select * from t_test where c1=%s % '1234567')
That should be a comma separating the bind values, not a % format operator:
Thanks for the explanation. I got it now. This is one more example
that the S
in SQL was never meant to stand for Standard :-)...
Ben
On Nov 9, 1:39 pm, jason kirtland [EMAIL PROTECTED] wrote:
Bruza wrote:
By using %s, does that mean MySQL does not support binding of
parameter
and will