Part 6 Creation of the UPDATE to database

Continue from Insert, adding and else statement
 

else {
                                //update
                                $query = "UPDATE education SET Startyear ='$Startyearinput_esc', Endyear='$Endyearinput_esc', School='$Schoolinput_esc', Course='$Courseinput_esc', Qualification='$Qualificationinput_esc', member_Member_id='$memberId' WHERE Education_id='$Educationinput_esc'";        
                                $queryResult = $db->writeQuery($query);  

                                if (!empty($queryResult)){
                                    //echo "Successfully updated new entries.";
                                    $database_mod = TRUE;
                                    $i++;
                                }