I'm getting the error:
Notice: Trying to get property of non-object.
I've been looking into this for a while now and wasn't able to find what's wrong with it, I tried some different ways of syntax(with [''] and things like this), but so far without success. I also watched a lot of old questions on SO but they didn't help me either.
My guess would be something is wrong in my query, because if I echo the result before the num_rows, it shows me nothing.
$dbhandle = new mysqli($hostdb, $userdb, $passdb, $namedb);
if ($dbhandle->connect_error) {
exit("There was an error with your connection: ".$dbhandle->connect_error);
}
$result6 = $dbhandle->query("SELECT * FROM email WHERE group= 'groupname' ");
$row_cnt6 = $result6->num_rows;
I hope you can help me out.