tried casting the request.args(0) as an int, it does not work I am afraid. I capture the request.arg(0) in the variable and if I print the variable tag_no I see a value in there so I don't know.
On Wednesday, November 14, 2012 4:58:05 AM UTC-6, David Sorrentino wrote: > Hello Paul, > > request.args[0] returns a string, and for *Rows = > db(db.bike.id==tag_no).select() > *you need an integer. > Try this: > > tag_no = int(request.args(0)) >> > > And let me know. > > Cheers, > David > > > On 14 November 2012 00:28, Paul Rykiel <ptry...@gmail.com <javascript:>>wrote: > >> Hi just learning WEB2py and I have a question: >> >> why do i get an error on this code >> **** This code errors out, but when I replace "tag_no" with 1 for record >> id 1, it works, also the variable "tag_no" has a 1 as a value when i type >> in an argument 1 on the end of the URL * >> >> def tag(): >> tag_no = request.args(0) >> Title = "For Sale" >> * Rows = db(db.bike.id==tag_no).select() * >> for row in Rows: >> serial = row.serial >> make = row.make >> model = row.model >> size = row.size >> color = row.color >> style = row.style >> date_of_receipt = row.date_of_receipt >> repairs = row.repairs_done >> price = row.price >> return locals() >> >> -- >> >> >> >> > > --