mardi 29 septembre 2020

Mysql Update does Insert and not Updating Database

i've tried to update an Entry from my MySql Database with this code:

 $pdo->exec("UPDATE todo 
                SET title='$todotitle', 
                    description='$tododescription', 
                    endDate='$todoEndDate', 
                    endDateTime='$todoEndDateTime', 
                    forUser='$checkBox' 
              WHERE id='" . $gettodoId . "'");

After Submit the Entry i've selected with "WHERE" got not Updated but a New Entry in my DB was created.

What did i wrong and how can i update my Entry with my code. Thank you!




Aucun commentaire:

Enregistrer un commentaire