Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialBrenna Hyland
1,774 PointsHello! Confused by the following error: "Bummer: Was expecting 4 entries in the products table. There's only 3"
Hello!
I am unsure as to why I am receiving the following error message and have tried multiple ways of typing this out. I ran into a similar one in the immediately following problem (just for 11 vs 10 not 4 vs 3). What am I missing on this in terms of my code? How do I go about rectifying this?
Thank you!
4 Answers
KRIS NIKOLAISEN
54,972 PointsCan you post your SQL? The error message you have received indicates no record was added to the products
table. The table already contains 3 records and if successful your record would be the 4th.
KRIS NIKOLAISEN
54,972 PointsYou should assume name
and description
are text and as such their values should be enclosed in quotes.
INSERT INTO products (id, name, description, price) VALUES (NULL, 'Tesla', 'car', 1000);
Alondra Herrera
1,082 PointsIt needs to be single quotes (') too, not double-quotes(").
Brenna Hyland
1,774 PointsOh no! I feel so dumb. Thank you for your help! I was under the impression the addition of quotes was just for more than 1 word.
Thank you so much for your quick help!
Bruce Crighton
1,253 PointsINSERT INTO products (id, name, description, price) VALUES (NULL,'green', 'crisps', 1.99);
Brenna Hyland
1,774 PointsBrenna Hyland
1,774 PointsThank you so much!
INSERT INTO products (id, name, description, price) VALUES (NULL, Tesla, car, 1000);
Where did I go wrong? Thanks!