North34 Posted November 24, 2020 Report Posted November 24, 2020 Hi :) So I am doing the PHP and MySQL-course in the studioweb-course. And I am using Xampp on a Mac, so the fields in my SQL version does not look exactly like they do in the video. I am currently at the video "PHPMyAdmin and Basic MySQL: part 2". When I write in the value of " INSERT INTO people (name) VALUES ('Stefan’); " around 2.55 into the video, I get the message: " INSERT INTO people (name) VALUES ('Stefan’); #1366 - Incorrect integer value: 'Stefan' for column `DATABAS2`.`people`.`name` at row 1 ". Any idea on what that means and how to solve it? And why is it showing up in my video and not in the lesson? Best regards Quote
administrator Posted November 24, 2020 Report Posted November 24, 2020 10 hours ago, North34 said: Incorrect integer value Sounds like you set that field to be of the datatype INT, so when you try to insert a string datatype, you will get that error. Makes sense? Stef Quote
North34 Posted November 25, 2020 Author Report Posted November 25, 2020 (edited) It worked when I did it today. Changed from INT to Varchar. But another thing. In the next lesson I was trying to insert an UPDATE-statement. But for some reason this will return: SQL query: Copy UPDATE people SET name = ”Jimmy the Frog” WHERE id = 3 MySQL said: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'the Frog” WHERE id = 3' at line 2 I don't know why that happens but this is a screenshot of the options I had picked before I pasted the UPDATE statement: Edited November 27, 2020 by North34 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.