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

Igor Skoldin
Igor Skoldin
6,779 Points

Why is not it working?

This topic is created with the "Get help" button under a task but the "Start discussion" button was not active until I chose a topic so it is posted like this.

https://teamtreehouse.com/library/integrating-php-with-databases/limiting-records-in-sql/limit-and-offset

SELECT title, author, genre, first_published FROM books LIMIT 10 OFFSET 10 ORDER BY title; 

The error is: "Your query needs to retrive the earliest 'Science Fiction' book from the books table.".

I am pretty sure my query does not need to retrieve it for this task. It may be a bug in the challenge.

Simon Coates
Simon Coates
28,694 Points

https://teamtreehouse.com/support states "Report a bug: Shoot us an email at help@teamtreehouse.com with a link and a screenshot." If people aren't vocal and complain, this kinds of irritations will persist. It's in everyone's interest to improve treehouse.

1 Answer

Simon Coates
Simon Coates
28,694 Points

The following will pass

SELECT * FROM books  ORDER BY title LIMIT 10 OFFSET 10 

The following will fail.

SELECT title, author, genre, first_published FROM books  ORDER BY title LIMIT 10 OFFSET 10

and give you a message about science fiction.

Mayur Pande
Mayur Pande
Courses Plus Student 11,711 Points

That is weird it did the same thing for me. How comes this was the case?