Re: Paginate custom SQL queries

2008-05-11 Thread Filip Camerman
Here's an explanation of how I did custom pagination. In app/config/bootstrap.php I include a global functions file which is located in app/webroot/includes/ if (file_exists("includes/global_functions.php")) require_once("includes/global_functions.php"); In this file are my pagination functio

Re: Paginate custom SQL queries

2008-05-06 Thread Sliv
Filip: Others might be interested in your efforts as well, perhaps you would be interested in posting to http://bin.cakephp.org and posting the URL here. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" gro

Re: Paginate custom SQL queries

2008-05-06 Thread Filip Camerman
Hi, I also needed to paginate custom queries and decided to make my own pagination which turned out to be easier than I thought, after all pagination is just adding LIMIT x,y to your query and determining x based on your current page. I wrote some global functions for all my pagination needs and

Re: Paginate custom SQL queries

2008-05-05 Thread Sam Sherlock
have you read http://www.littlehart.net/atthekeyboard/2008/03/04/custom-cakephp-12-pagination-queries/ hth - S 2008/5/5 Louie Miranda <[EMAIL PROTECTED]>: > Greetings, > > I wanted to paginate my custom SQL queries. Is this possible on Cake 1.2? > > function search($keywords = null) > { >

Paginate custom SQL queries

2008-05-05 Thread Louie Miranda
Greetings, I wanted to paginate my custom SQL queries. Is this possible on Cake 1.2? function search($keywords = null) { $this->checkSession(); $keywords = $this->data['Search']['keywords']; $sql = "SELECT * FROM web_logs as WL where username LIKE '%$keywords%' order