Welcome Guest, Not a member yet? Register   Sign In
How to identify if an array has been defined?
#3

[eluser]andrewtheandroid[/eluser]
Hi efinanceweb the query result will return an array. if the array is empty there are no results so you just need to check if the resulting array is empty by using the count() or sizeof() function.

$query = $this->db->get('tablename');
$data = $query->result_array();

count($data)

is that what you mean?


Messages In This Thread
How to identify if an array has been defined? - by El Forum - 11-03-2009, 05:06 PM
How to identify if an array has been defined? - by El Forum - 11-03-2009, 05:26 PM
How to identify if an array has been defined? - by El Forum - 11-03-2009, 05:30 PM
How to identify if an array has been defined? - by El Forum - 11-03-2009, 05:59 PM
How to identify if an array has been defined? - by El Forum - 11-03-2009, 06:09 PM
How to identify if an array has been defined? - by El Forum - 11-03-2009, 07:06 PM



Theme © iAndrew 2016 - Forum software by © MyBB