Chapter 5. Working with Databases, Page 94

Location on the page: 
3rd Code Sample
Chapter: 
5. Working with Databases
Error: 


$result = db_query_range(db_rewrite_sql($sql), $type, $status, 0, 10);

Correction: 


$result = db_query_range(db_rewrite_sql($sql), 0, 10, NULL, $type, $status);

Description of the Error: 

According to api.d.o, pager_query receives SQL arguments from the fifth parameter on.