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 trial

PHP

[SOLVED] In the "movies" table INSERT a new movie with the title "Back to the Future" and year 1985.

I'm struggling with this particular code quest.

Challenge Task 1 of 2 on Stage 1 of Database Foundations - Introduction to Data, Databases, and SQL

This is my code:


INSERT INTO ("movies") VALUES ("Back to the Future",1985)


Any help would be greatly appreciated. What am I doing wrong?

Update.... Solved this by removing the parentheses and quotations from movies.

This code passed:


INSERT INTO movies VALUES ("Back to the Future",1985)


Ken Alger
Ken Alger
Treehouse Teacher

Leanne;

Welcome to Treehouse and nice work on coming up with the solution on your own.

I updated your post title to show it as being solved.

Happy coding,

Ken

3 Answers

Challenge Task 1 of 2

In the "movies" table INSERT a new movie with the title "Back to the Future" and year 1985.

INSERT INTO movies VALUES ("Back to the Future", 1985)

Challenge Task 2 of 2

In the "actors" table INSERT a new actor with the name "Michael J. Fox".

Insert into actors values ("Michael J. Fox"); OR

INSERT INTO actors VALUES ("Michael J. Fox");

Hi Ken, Thank you... I'm still learning how to use the website. Out of interest how do you mark something as "Solved" for future reference? Best Regards Leanne

Challenge Task 1 of 2

In the "movies" table INSERT a new movie with the title "Back to the Future" and year 1985.

INSERT INTO movies VALUES ("Back to the Future", 1985)

Challenge Task 2 of 2

In the "actors" table INSERT a new actor with the name "Michael J. Fox".

Insert into actors values ("Michael J. Fox"); OR

INSERT INTO actors VALUES ("Michael J. Fox");