Welcome Guest, Not a member yet? Register   Sign In
num_rows returning empty while result_array has results
#1

Hi

I don't know if it is a bug or if I am doing something wrong. I am using CI3 RC3. While testing the code I've written originally for CI2 I've figured that $query -> num_rows was empty. The query is simple and list everything I have in a table, so the results do exists, only the num_rows is empty and I don't understand why.

I can find correctly the num_rows in the following way: $query -> result_id -> num_rows

[result_id] => mysqli_result Object
(
[current_field] => 0
[field_count] => 7
[lengths] =>
[num_rows] => 25
[type] => 0
)

[result_array] => Array
(
)

[result_object] => Array
(
)

[custom_result_object] => Array
(
)

[current_row] => 0
[num_rows] =>
[row_data] =>
)

Is this a bug or the $query -> num_rows will disappear in this update?
Reply


Messages In This Thread
num_rows returning empty while result_array has results - by ruiganga - 03-26-2015, 08:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB