[web2py] Insert method in DAL returns incorrect id

2014-10-05 Thread Gliese 581 g
I have a simple controller method where I insert a record in mes table and return the id of inserted record as given below: return db.mes.insert(me=metext,locale=localeid) However it return incorrect id. When I check the id of the record through MySQL workbench it shows some number greater

[web2py] Re: Insert method in DAL returns incorrect id

2014-10-05 Thread Gliese 581 g
Yes I have auto increment field and I have done manual insertions and deletions in it. But insert should return latest id irrespective of what I do to the table. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Insert method in DAL returns incorrect id

2014-10-05 Thread Gliese 581 g
Please let me know what I have to do to get the id of inserted record. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because

[web2py] Delete a row at a given index from a Rows object

2014-09-13 Thread Gliese 581 g
I have fetched large number of rows from a database. I am fetching the rows from database and storing it in a session. Now when I delete a record for some reasons I do not want to get the entire data back but just delete the corresponding row from the Rows object. I have the index of deleted

[web2py] Re: Delete a row at a given index from a Rows object

2014-09-13 Thread Gliese 581 g
that will not delete the record from the database -- only from the Rows object itself. Anthony On Saturday, September 13, 2014 12:12:39 PM UTC-4, Gliese 581 g wrote: I have fetched large number of rows from a database. I am fetching the rows from database and storing it in a session. Now

[web2py] DAL query error TypeError: unsupported operand type(s) for : 'str' and 'Query'

2014-09-08 Thread Gliese 581 g
I have two tables - element and example. I want to find element like items in example table but their status should either be 0 or 2. I have written a query to fetch records from two tables as given below: rows=db(('instr(microelementexamplestest.example,microelementstest.element)')

[web2py] Re: Call web2py jsonrpc service using jquery

2014-09-04 Thread Gliese 581 g
, Anthony wrote: Have you confirmed that the function is actually getting called? Anything in request.body? Anthony On Thursday, September 4, 2014 12:42:06 AM UTC-4, Gliese 581 g wrote: I am trying to make ajax jsonrpc call to my web service using jQuery as given below: $(document

[web2py] Call web2py jsonrpc service using jquery

2014-09-03 Thread Gliese 581 g
I am trying to make ajax jsonrpc call to my web service using jQuery as given below: $(document).ready(function() { $(#btnNext,#btnPrevious).click(function() { var req = { jsonrpc: 2.0, method: nextprevexample, id: (new Date).getTime()

[web2py] Where does Apache HTTP server stores incoming request's data

2014-02-28 Thread Gliese 581 g
I have Apache HTTP server configured on Linux machine. I am sending requests to it from my Windows machine. I want to check the contents of incoming request. Where does it stores the data of incoming request? I have checked it on my Windows machine where it uses

[web2py] Re: SQLFORM.grid - Create from list of objects

2013-09-10 Thread Gliese 581 g
. Anthony On Tuesday, September 10, 2013 12:28:47 AM UTC-4, Gliese 581 g wrote: Hi Massimo, Thanks for suggesting this solution. I am now able to display a gird on my page with pagination and sorting options available. But whenever I click on page number or try to sort a column by clicking

[web2py] Re: SQLFORM.grid - Create from list of objects

2013-09-09 Thread Gliese 581 g
) temp_db.mytable.truncate() temp_db.mytable.insert() form = SQLFORM.grid(temp_db.mytable) On Sunday, 8 September 2013 05:35:13 UTC-5, Gliese 581 g wrote: Hi Massimo, I will try to be more specific. I am developing a web2py application(APP1) which works on the data which it gets from

[web2py] Re: SQLFORM.grid - Create from list of objects

2013-09-08 Thread Gliese 581 g
this? Please suggest me any solution. Thank you. On Friday, 6 September 2013 20:26:54 UTC+5:30, Gliese 581 g wrote: ** I am working on a project where we have a different subsystem whose API returns a list of certain type of objects. I want it to be displayed on my form. Can I use

[web2py] SQLFORM.grid - Create from list of objects

2013-09-06 Thread Gliese 581 g
** I am working on a project where we have a different subsystem whose API returns a list of certain type of objects. I want it to be displayed on my form. Can I use SQLForm.grid for this? Please suggest. -- --- You received this message because you are subscribed to the Google Groups

[web2py] SQLFORM.factory field's type and default properties are not working as expected

2013-09-05 Thread Gliese 581 g
Hi, I have a cutom form which I am displaying using SQLFORM.factory as given below: searchform=SQLFORM.factory( Field('uid', 'integer', requires=[IS_LENGTH(15,15)]), Field('uaccount','unicode',default=None)) if searchform.accepts(request.vars): result=__get_payments()