On Thursday, May 11, 2017 at 5:05:09 PM UTC-7, kaungyaz...@gmail.com wrote: > > I create one db customer table.I can insert data into the database but i > dont know how to retrieve data back on the screen.i m using SQLFORM method. >
The basic answer is that you query the database for the data, and put it in a dict(), and the view displays it. Details vary slightly depending on whether you want one result or many (mainly in how you make the query). A good place to start is in Chapter 3 of the book, with the image blog example. <URL:http://web2py.com/books/default/chapter/29/03/overview#An-image-blog> (as a shortcut, scroll down from there to the sample code with an "orderby" in it ... easily found with the browser find (^F, typically)). SQLTABLE is a helper that makes displaying "many results" easy, but you can build your own table or graduate to SQLFORM.grid. For development purposes, the generic view will display one entry or many entries in a half-way civilized fashion, but once you're comfortable with what data you're getting back, you'll want to manage the display in a non-generic view. /dps -- 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.