Re: [web2py] Re: dal exception occurs when running on gae

2011-03-12 Thread zhao peng
thanks. On Sat, Mar 12, 2011 at 10:07 PM, Massimo Di Pierro wrote: > It is not a web2py bug. web2py it is just telling you that GAE cannot > do this, because there are no expressions on GAE. > > Instead of this: > > db(db.user.id == session.user_id).update(post_num =  db.user.post_num > + 1) > >

Re: [web2py] is there a function to increase a sql field

2011-03-05 Thread zhao peng
Thanks a lot. It works. On Sun, Mar 6, 2011 at 1:13 AM, Vasile Ermicioi wrote: > update tabl1 set field1=field1+1 where your_condition > db(some dal condtion like: db.table1.id>0).update(field1=db.table1.field1+1)

[web2py] is there a function to increase a sql field

2011-03-05 Thread zhao peng
Hi, I want to know is there a function to add 1 to a sql field, or else I have to select to get the value of the field and then add 1 to the value, then update the field. Thanks.

Re: [web2py] Re: need help on ajax() post

2011-02-25 Thread zhao peng
send the application to you if you want to follow this issue. Thanks a lot. On Sat, Feb 26, 2011 at 12:51 AM, DenesL wrote: > > Please tell us which web2py version, which browser, which OS, etc. > > > On Feb 25, 2:17 am, zhao peng wrote: >> Hi, >> >>   I followed the

Re: [web2py] Re: need help on ajax() post

2011-02-24 Thread zhao peng
en_author', 'hidden_text'],'comment_list_'+id); the url passed to ajax() is "/appname/default/submit_comment". On Thu, Feb 24, 2011 at 9:57 PM, DenesL wrote: > > Hi, > > I don't see anything wrong. > Can you post more of your code?. > &

[web2py] need help on ajax() post

2011-02-24 Thread zhao peng
hi, I defined two functions in controllers/default.py: def submit_comment(): . def people(): ... and in the default/people.html, I want to use ajax to post data to submit_comment(): ajax('submit_comment',['id', 'author', 'text'],'comment_list_'+id); but by my testing, the ajax()