Welcome Guest, Not a member yet? Register   Sign In
non-object
#5

[eluser]jedd[/eluser]
[quote author="GamingFusion" date="1256533598"]
jedd the id has to be valid because you clikc a link on a other page that gets all the shows in the database with a valid id
[/quote]

Allow me to disabuse you of this belief.

If you're taking the input from your URL - as per your code $this->uri->segment(3) - there is no 'has to be valid' about it. A user may modify the URL to be any value they choose, or you may have some logic bug elsewhere (perhaps where you didn't check your data) ... regardless of what you want to believe about the nature of the URL.

You should take the value in as a parameter to your function, you should have a default value, you should check/sanitise the data, and you should check for the case of no rows being returned.


Messages In This Thread
non-object - by El Forum - 10-25-2009, 05:53 PM
non-object - by El Forum - 10-25-2009, 05:58 PM
non-object - by El Forum - 10-25-2009, 05:58 PM
non-object - by El Forum - 10-25-2009, 06:06 PM
non-object - by El Forum - 10-25-2009, 07:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB