In my previous question: [web2py] How to get the last DB Field data : I got some good response. But my issue still persists. My code:
<https://lh3.googleusercontent.com/-ITVP6pmYGH0/WhOeE6ZRvTI/AAAAAAAANOE/htmOlcxFLQ8xNnjFj7v00JG4tmv4ZoWVQCLcBGAs/s1600/Screenshot%2Bfrom%2B2017-11-21%2B06-25-18.png> def view_searches(): quizy = [] form = SQLFORM(db.post).process() if request.vars.message: db.post.insert(message = request.vars.message) quizes = db(db.post.author == auth.user.id).select(db.post.ALL, orderby=~db.post.created_on, limitby=(0,1)) for q in quizes: quizy.append(q.message) quiz= quizy[0] print quiz return dict(form=form, quiz=quiz) Note the print quiz for illustration purpose. Now note the print screen below: <https://lh3.googleusercontent.com/-ITVP6pmYGH0/WhOeE6ZRvTI/AAAAAAAANOE/htmOlcxFLQ8xNnjFj7v00JG4tmv4ZoWVQCLcBGAs/s1600/Screenshot%2Bfrom%2B2017-11-21%2B06-25-18.png> Notice the last post is;'God is love' - If using print, i get the exact last posted item - if I use return on the html page, I get aowirhsgporhj......previous posted message, also shown on the terminal. - Note that the html page returns the random letter print; aowirhsgporhj... instead of 'God is love' - I used print to illustrate the erros. If i remove print function, the error persists where i can't get the last posted item My request is how do i resolve this? Regards -- 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 you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.