Error in connection to DB
Hey, please see image
I'm receiving this error and I can't for the life of me figure out what is going wrong:
Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':title, content = :content WHERE id = :id' at line 1 in C:\laragon\www\H8-prikbord\backend\berichtenController.php:33 Stack trace: #0 C:\laragon\www\H8-prikbord\backend\berichtenController.php(33): PDOStatement->execute(Array) #1 {main} thrown in C:\laragon\www\H8-prikbord\backend\berichtenController.php on line 33

8 Replies
You've got a typo in the execute call
where?
Tilte / title
wait, I'm using nowhere a capital letter though?
or wiat
wait
nope the db doesn't either
OH
nvm i see it now
thanks!
Np
Sorry, I'm on mobile, so capitals are annoying to get right
nah its alright XD
I am just going blind I think
didnt even realise you wrote a diff word
i read title twice here
that was the issue, im so annoyed
i looked over it atleast 15 times
Happens to everyone 🙂
i strongly recommend using this extension: https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker
it avoids this type of mistake