Welcome Guest, Not a member yet? Register   Sign In
problem in finding second maximum value
#15

[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
  }

 
 
 


Messages In This Thread
problem in finding second maximum value - by El Forum - 04-19-2011, 11:09 PM
problem in finding second maximum value - by El Forum - 04-19-2011, 11:16 PM
problem in finding second maximum value - by El Forum - 04-19-2011, 11:24 PM
problem in finding second maximum value - by El Forum - 04-19-2011, 11:34 PM
problem in finding second maximum value - by El Forum - 04-20-2011, 12:07 AM
problem in finding second maximum value - by El Forum - 04-20-2011, 12:28 AM
problem in finding second maximum value - by El Forum - 04-20-2011, 01:19 AM
problem in finding second maximum value - by El Forum - 04-20-2011, 01:22 AM
problem in finding second maximum value - by El Forum - 04-20-2011, 01:32 AM
problem in finding second maximum value - by El Forum - 04-20-2011, 02:03 AM
problem in finding second maximum value - by El Forum - 04-20-2011, 02:41 AM
problem in finding second maximum value - by El Forum - 04-20-2011, 02:47 AM
problem in finding second maximum value - by El Forum - 04-20-2011, 03:14 AM
problem in finding second maximum value - by El Forum - 04-20-2011, 03:46 AM
problem in finding second maximum value - by El Forum - 04-20-2011, 05:12 AM
problem in finding second maximum value - by El Forum - 04-20-2011, 05:23 AM
problem in finding second maximum value - by El Forum - 04-20-2011, 05:49 AM
problem in finding second maximum value - by El Forum - 04-20-2011, 06:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB