[eluser]John_Betong_002[/eluser]
[quote author="Bigil MM" date="1303310808"]
when the result become 0
ie if the year and constituency_id didnot matches
at that time it shows error on controller as undefined property
how will i avoid that error?????
[/quote]
The code I supplied had a check to prevent the
undefined property error.
If you chose to remove the check then the error will always appear.
Code:
#query = $this->db->query($sql);
if($query->num_rows() > 0)
{
// IT IS OK TO DO SOMETHING BECAUSE THERE IS VALID DATA
}