since I need to use a zend db select object for the zend paginator, I was wondering if anybody found an implementation of an automatic conversion mechanism b/w a normal query to a zend db select object or have actually implemented such automatic conversion and is willing to share the code…
note that I’m not asking HOW to convert query to zend db select…I know how to do it….I’m asking if anybody already have/know an actual coded implementation of such procedure since I don’t wanna waste time reinventing the wheel….
You should be able to use the null adapter, and simply pass in a count rather than a query. You’d need to figure out the count (total # of records) yourself, prior.
This allows you to use the paginator just to render pagination, rather than to actually apply limiting to data. You should be able to generate a LIMIT clause pretty easily if you have the page, and the items per page.
You can also make your own adapter which takes a (string) query, and you apply the limit to the end of it with your adapter. This way, you could also have it implement the getItems() method so it’s standardized.