Using new version from SVN, works well. As a note to others who may search in relation to pagination related to SQL Server: 1. Be sure you specify a $order on your model (case sensitive), or auto-pagination will not work 2. Last page will not behave as expected. If you have pages of 20 each, the last page will show 20 records regardless of whether there are 20 records to fill it or not. If there are not 20 records after the second-to-last page, it will show the final records as well as some records from the previous page to meet 20. This is a limitation with SQL Server that is not easily overcome without some stored procedures (most efficient) or logic on the PHP side (easier, but far less efficient).
Nate: I can post a detailed bug if you'd like. It works, just has unexpected behavior for last page. Despite it being a limitation with mssql, there might be some php-side stuff that can be done to overcome it. In addition, SQL 2005 allegedly has a function that may allow more expected behavior (perhaps separate drivers?). Let me know if this is something I should report as a bug. On Apr 14, 9:06 pm, "nate" <[EMAIL PROTECTED]> wrote: > I had to fix a couple things in the SQL Server driver anyway, so I was > able to track down the issue. Update to the latest SVN version of the > driver. > > On Apr 14, 7:33 pm, "Joshua Benner" <[EMAIL PROTECTED]> wrote: > > > On each (of two) pages (there are right now 21 records), it will show > > only the first twenty records. > > > When it loads page one, it sends a simple select top 20 statement to > > the DB. When loading page two, it sends the odd one I pointed out > > above. > > > Should I enter a bug report, or should I work on tracking down the > > issue a bit? > > > On Apr 14, 4:20 pm, "nate" <[EMAIL PROTECTED]> wrote: > > > > Okay, here's my question: are you looking at it and thinking, based on > > > your understanding of the query, that it will only ever return the > > > first 20 rows, or are you actually attempting to navigate from page to > > > page, and actually experiencing that it will only return the first 20 > > > rows? > > > > On Apr 13, 6:23 pm, "Joshua Benner" <[EMAIL PROTECTED]> wrote: > > > > > Please note, I don't know if this is a bug... if feedback suggests it > > > > is, then I'll submit a bug report -- but I'd like to seek input from > > > > others first. > > > > > I'm using the scaffolding on a very basic table for inputting some > > > > support data. However, the scaffold does not seem to paginate > > > > properly, showing the first 20 records while on page two. The query it > > > > sends for page one is straightforward enough... but then the query it > > > > sends for page 2 is along the following lines: > > > > > select * from (select top 20 * from (select top 20 field1 as > > > > field1,... from table where 1=1) as Set1) as Set 2 > > > > > I'm not sure what it's trying to do there... but that query will > > > > return just the first twenty rows, not the second set of twenty. Is it > > > > possible I have something configured wrong? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
