Re: [web2py] Delete Query Not Working

2014-07-16 Thread dlypka
you might need to db.commit() after the delete(). versioning might be doing a commit() for you. On Tuesday, July 15, 2014 9:05:09 AM UTC-5, samurai wrote: No, I hadn''t. But it worked on turning it on. Thanks But I don't get it. Record versioning just creates an archived db for the

Re: [web2py] Delete Query Not Working

2014-07-15 Thread Shubham Jain
No, I hadn''t. But it worked on turning it on. Thanks But I don't get it. Record versioning just creates an archived db for the modifications done. So how this feature being disabled is restricting me from deleting a record ?? *Shubham Jain* 3rd Year, Software Engg Delhi Technological

Re: [web2py] Delete Query Not Working

2014-07-14 Thread lyn2py
Did you turn on versioning? Can you post a traceback? On Friday, July 11, 2014 3:21:14 PM UTC+8, samurai wrote: As both Manuele and Leonel said, I changed it to args(0). But no use. It was still not working. I actually changed a bit and now I am getting 'd' by get.vars. def pro_del():

Re: [web2py] Delete Query Not Working

2014-07-11 Thread samurai
As both Manuele and Leonel said, I changed it to args(0). But no use. It was still not working. I actually changed a bit and now I am getting 'd' by get.vars. def pro_del(): d = request.get_vars.d db(db.products.product_id == d).delete() session.flash = Product

[web2py] Delete Query Not Working

2014-07-09 Thread samurai
This is the function for deleting a record from database. def pro_del(): d = request.args db(db.products.product_id == d).delete() session.flash = Product Deleted redirect(URL('default','index')) #return locals() The id is successfully getting passed to

Re: [web2py] Delete Query Not Working

2014-07-09 Thread Manuele Pesenti
Il 09/07/14 10:32, samurai ha scritto: def pro_del(): d = request.args db(db.products.product_id == d).delete() session.flash = Product Deleted redirect(URL('default','index')) #return locals() try this: def pro_del(): d = request.args(0) or

Re: [web2py] Delete Query Not Working

2014-07-09 Thread samurai
Thanks Manuele. Just writing (0) worked for me as my product_id is'nt an int type. Its alphanumeric. On Wednesday, July 9, 2014 4:32:55 PM UTC+5:30, Manuele wrote: Il 09/07/14 10:32, samurai ha scritto: def pro_del(): d = request.args db(db.products.product_id ==