Hi
I have this object:
mysqli_native_moodle_recordset Object
(
[result:protected] => mysqli_result Object
(
[current_field] => 0
[field_count] => 22
[lengths] => Array
(
[0] => 6
[1] => 1
[2] => 12
[3] => 20
[4] => 0
[5] => 0
[6] => 0
[7] => 0
[8] => 0
[9] => 20
[10] => 7
[11] => 3
[12] => 2
[13] => 2
[14] => 2
[15] => 1
[16] => 1
[17] => 6
[18] => 9
[19] => 1
[20] => 2
[21] => 6
)
[num_rows] => 10
[type] => 0
)
[current:protected] => Array
(
[id] => 148722
[picture] => 0
[firstname] => dari
[lastname] => bar
[firstnamephonetic] =>
[lastnamephonetic] =>
[middlename] =>
[alternatename] =>
[imagealt] =>
[email] =>
[username] =>
[city] =>
[country] =>
[lang] =>
[timezone] =>
[maildisplay] =>
[hidden] => 1
[ctxid] => 455402
[ctxpath] =>
[ctxdepth] =>
[ctxlevel] =>
[ctxinstance] => 148722
)
)
How do I get the value of “num_rows” (which is ‘10’) ?
I tried this:
$mysqli_native_moodle_recordset->result->num_rows
but got an error message: "Fatal error: Cannot access protected property mysqli_native_moodle_recordset::$result "