On Dec 25, 2007, at 2:54 PM, jerryji wrote:

>
> However, the following parameterized version fails --
>
> result = model.Session.execute("select * from labels where
> labelid=:labelid", {'labelid':10}, mapper=model.Label)
>
> with the following syntax error exception --
>
> ...

heya -

the "generic" textual bind params i.e. ":someparam" apply to the  
"sql.text()" construct, whereas a plain string doesnt get processed at  
all, so do it like Session.execute(text("select * from foo where  
x=:label"), {<params>}, ...).

- mike

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to