--On 11. Juni 2008 17:55:44 +0100 King Simon-NFHD78 <[EMAIL PROTECTED]> wrote:
-----Original Message----- From: sqlalchemy@googlegroups.com [mailto:[EMAIL PROTECTED]On Behalf Of jack2318Sent: 11 June 2008 17:50 To: sqlalchemy Subject: [sqlalchemy] text I tried very simple test: s = text("SELECT COUNT(*) FROM table WHERE field LIKE 'something'") count = conn.execute(s).fetchone() and this produced error Unexpected error: <type 'exceptions.TypeError'> not enough arguments for format string not big deal there is few way around but just for completeness I believe it should work (no parameters to expand) regards -- jacek PS: I am using mysqlAre you sure you didn't try: s = text("SELECT COUNT(*) FROM table WHERE field LIKE 'something%'")
'%' must be quoted as '%%' in Python. -aj
pgpwdoqzxGU8V.pgp
Description: PGP signature