Hmm, doesn't look like the Google SQL adapter takes a placeholder argument: 
http://code.google.com/p/web2py/source/browse/gluon/dal.py#4028. I'm not 
sure if that changed at some point. The MySQL adapter should take 
placeholders, though.

Anthony

On Saturday, September 15, 2012 11:09:43 PM UTC-4, Matt wrote:
>
> I'm using GAE + Cloud SQL (essentially MySQL.)
>
> I've been using executesql like this in 1.99.7 and it was working fine 
> then.
>
> Kind regards,
> Matt
>
> On Sunday, September 16, 2012 2:34:02 AM UTC+12, Anthony wrote:
>>
>> Not all of the adapters allow placeholders. Which one are you using?
>>
>> On Friday, September 14, 2012 11:59:20 PM UTC-4, Matt wrote:
>>>
>>> Hi there,
>>>
>>> Another bug in 2.0.x:
>>>
>>>
>>> def test_execute():
>>>   rows = db.executesql('select * from y where id = %(id)s', placeholders 
>>> = dict(id = 1), as_dict = True)
>>>   return str(rows[0])
>>>
>>> raises:
>>>
>>>   File "/Projects/www/gluon/dal.py", line 7257, in executesql
>>>     adapter.execute(query, placeholders)
>>> TypeError: execute() takes exactly 2 arguments (3 given)
>>>
>>> Matt
>>>
>>

-- 



Reply via email to