I am trying to create event using mysqli prepared statement but the code is not working i found out that when i put the mysqli statement inside the prepared statement quot some of the clause such as ON,WHERE,SET,AND,UPDATE all turn red in color I have been trying to figure it out but not yet and the code is not working please i need someone to fix my code.
$d_sql = $connect->prepare("CREATE EVENT stop_fad_1 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 MINUTE ON COMPLETION PRESERVE DO UPDATE fad SET active_status=? WHERE fad_id=? AND sender=? AND reciever=?");
$d_sql->bind_param("iiii",$complete_status,$fad_id,$sender,$reciever);
$d_sql->execute();
then am getting error like this but i have check out my data i supplied to the statement they are all correct
Fatal error: Call to a member function bind_param() on boolean in C:\xampp\htdocs\Alertmedia\fad\php\comfirm_gp_fad.php on line 35