I'm running a query that looks like this:
$results = $DB2->query("SELECT COUNT(*) FROM auth_user as count WHERE email='" . $DB2->escape_str($email) . "';");
It's returning an object that looks like this:
DB_Cache Object
(
[result] => Array
(
[0] => Array
(
[COUNT(*)] => 0
)
)
[row] => Array
(
[COUNT(*)] => 0 // I WANT YOU!
)
[num_rows] => 1
[q_count] => 1
[fields] => Array
(
)
)
I am trying to access the [count] array value using this:
$results->row['count'];
It's not returning anything. Any ideas what I'm doing wrong?