Jump to content

Recommended Posts

Posted

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

 

Posted
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

Posted (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:

1946146173_screenshot2.thumb.png.54cc4ae6cf6a0de7da45b43cc2f5a051.pngScreenshot.thumb.png.ad8a1fde6e1fea8dbcb4272f6c414942.png

 

 

 

Edited by North34
  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...