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
No description
8 Replies
Jochem
Jochem2w ago
You've got a typo in the execute call
Brightie
BrightieOP2w ago
where?
Jochem
Jochem2w ago
Tilte / title
Brightie
BrightieOP2w ago
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!
Jochem
Jochem2w ago
Np Sorry, I'm on mobile, so capitals are annoying to get right
Brightie
BrightieOP2w ago
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
Jochem
Jochem2w ago
Happens to everyone 🙂
ἔρως
ἔρως2w ago
i strongly recommend using this extension: https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker it avoids this type of mistake

Did you find this page helpful?