0

I have a mysql table for keeping track of books. When i try to enter a new book the EAN column only keeps the initial value that was inserted into the table.

MySQL table description I am using insert statements like this:

INSERT INTO `Books` (`EAN`, `ISBN13`, `ISBN10`, `ASIN`, `Title`, `author`, `imprint`, `price`) VALUES ('9781633669783','','','','[Title]','[Author]','[imprint]','');
INSERT INTO `Books` (`EAN`, `ISBN13`, `ISBN10`, `ASIN`, `Title`, `author`, `imprint`, `price`) VALUES (9781633669783,'','','','[Title]','[Author]','[imprint]','');

When I try to insert a book all of the info gets inserted correctly except for the EAN column. The EAN for every book is the same in the table but the value was not the same when I added the book.

1
  • Did you hardcoded the EAN value? Commented Feb 11, 2014 at 17:59

2 Answers 2

1

Similar to the other StackOverflow answer here, it looks like your EAN values are too big for an INT field. (INT has a max value of 2,147,483,647) You might want to try switching the field to another type such as a BIGINT.

Sign up to request clarification or add additional context in comments.

1 Comment

I don't know why i didn't see the the 'default' value was only 10 digits. Thanks man.
1

Can you try removing the quotes around the EAN value? Looks like you're trying to write a string to an INT column.

1 Comment

No Change in the outcome. Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.