Sorry I didnt test this way. I also didnt know that search returns a select.
Enviado via iPhone Em 05/11/2010, às 01:58, mdipierro <[email protected]> escreveu: > Just: > > search, rows = crud.search(table) > > search returns a tuple. > > On Nov 4, 10:29 pm, Bruno Rocha <[email protected]> wrote: >> It is ok to do >> >> search, rows = crud.search(table), crud.select(table) >> >> Edited! >> >> 2010/11/4 villas <[email protected]> >> >> >> >>> http://www.web2py.com/book/default/chapter/07#CRUD >> >>> I noticed this example in the book which does not seem correct: >> >>> def manage(): >>> table=db[request.args(0)] >>> form = crud.update(table,request.args(1)) >>> table.id.represent = lambda id: \ >>> A('edit:',id,_href=URL(args=(request.args(0),id))) >>> search, rows = crud.select(table) # <<<------ >>> return dict(form=form,search=search,rows=rows) >> >>> May I suggest replacing the marked line: >>> search, rows = crud.select(table) >> >>> with these two lines: >>> search = crud.search(table) >>> rows = crud.select(table) >> >>> -D >> >> -- >> >> http://rochacbruno.com.br

