Welcome Guest, Not a member yet? Register   Sign In
Best Practices for No Results from Database Query?
#3

[eluser]kirkaracha[/eluser]
I'd prefer to only load the view if there's something to display and keep the presentational login in them to a minimum.

The way I have it set up now, I run the query from the controller and load the view if there are results or set a flash_data message and load a shared view to display the message if there aren't any results. That seems cleaner to me than putting the logic in the view files.


Messages In This Thread
Best Practices for No Results from Database Query? - by El Forum - 02-08-2010, 04:02 PM
Best Practices for No Results from Database Query? - by El Forum - 02-08-2010, 05:32 PM
Best Practices for No Results from Database Query? - by El Forum - 02-08-2010, 05:52 PM
Best Practices for No Results from Database Query? - by El Forum - 02-08-2010, 06:08 PM
Best Practices for No Results from Database Query? - by El Forum - 02-08-2010, 06:16 PM
Best Practices for No Results from Database Query? - by El Forum - 02-08-2010, 06:29 PM



Theme © iAndrew 2016 - Forum software by © MyBB