can anyone advise why i am getting this error in line 109 ?

Call to a member function query() on a non-object in .... .....
Code:
    $sql = "SELECT *
FROM Articles
WHERE (
`reference` >0
AND `Timer` >1000
)
ORDER BY timergrab
LIMIT 1 ;";

$log2.="SQL $sql\n";

        $result = $mysqli->query($sql); << Line 109
        $mysqli->close();
The table name / database etc are correct. is there a guide / solution to tell us what an 'object" is ? i've set it & it does exist (the object).

( I've tried with or without the ; semicolon at end of $sql. )



LOL - NEVER MIND - I forgot to connect to MYSQLI