I am working on the below code. Why am I not able to run the query properly? I already check the database connection and it is fine
 <?php
 $sql = "SELECT dt, events, eventtype FROM events";
 $stmt = $mysqli->prepare($sql);
        $stmt->execute();
        $stmt->bind_result($dt,$events,$eventtype);
        $stmt->store_result();
        if($stmt->num_rows >0)  {
            $stmt->fetch();
        }
            else {
                echo "Cant Find The data!";
            }
$stmt->close();
$mysqli->close();
        echo $dt;
        echo $events;
        echo $eventtype;
?>
getting this error
Fatal error : Call to a member function execute() on boolean in /srv/disk1/2555378/www/domain.net/index.php on line 113
 
     
    