
Originally Posted by
XemiCal
Hey. I'm getting an error "Notice: Trying to get property 'num_rows' of non-object in C:\wamp64\www\new\sources\public\main-rank.php on line 19" and its driving me nuts.
I have checked the repository main branch and this is line 19 on this file:
Code:
if ($gc->num_rows) {
On the previous line, the $gc variable value is set:
Code:
$gc = $mysqli->query("SELECT c.$first , c.$second, c.name, c.accountid, a.banned AS banned FROM characters c LEFT JOIN accounts a ON c.accountid = a.id WHERE c.gm < '$gmlevel' AND banned = 0 GROUP BY c.id DESC ORDER BY $first DESC, $second DESC LIMIT 5");
The code is expecting the result of the query to be an object, but apparently it is returning a null value, which isn't an object, obviously.
I believe the reason behind the null result from the query is related to bad database credentials configuration. Make sure you've properly configured your database connection at the database config file (which I believe it's assets/config/database.php from what I checked at github repo).