I'm working on a PHP Real Estate catalog. I am working on the search part right now and I'm having trouble with the logic.
Should the defaul开发者_Go百科t view show all items in the catalog or the search page? Should the code flow handle search first or individual view first?
Ideas, tips, links are appreciated. Thanks.
It is best to use the SQL statement as the model for the search view; this way you can decouple the view from any processes. This would help to simplify the code flow too as well as regardless if you are searching or just displaying the generic view, the only things that change is the model (i.e, the SQL statement)
精彩评论