"Like Spec. find, paginate returns a list of specs, but it also returns a list of pages for the results in the variable @pages;notethatpaginatereturnsatwo-elementarray,sowecanassignbothvariablesatthesametimeusingRuby's multiple assignment syntax: a, b = [1, 2] # a is 1, b is 2 Don't worry too much about what @pages is exactly; its main purpose is to be fed to the pagination_links function in the view, which we'll do momentarily."
"Find the number of pages based on $count and $limit */$pages = $p - > findPages ($count, $limit);/* Now we use the LIMIT clause to grab a range of rows */$result = mysql_query ( "SELECT * FROM table LIMIT". $start. ","