Re: How paginate results of search?

2007-05-25 Thread AD7six



On May 23, 4:48 am, hostdesigner <[EMAIL PROTECTED]> wrote:
> Like know how paginate results of search with cakePHP, I know do with
> PHP, but in cakePHP...
>
> Thanks!

There's an example in the 1.1 pagination demo which is available here:
http://cakeforge.org/projects/noswad . The exact same principles apply
to 1.2.

hth,

AD


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: How paginate results of search?

2007-05-23 Thread Falagar

In Cake 1.2, just use the paginator.

In your controller, have a search action which sets the search
conditions:

$this->paginate['conditions'] =  array('myfield' => 'mysearch' );
$this->set( 'mydata', $this->paginate() );

You might want to store the search conditions in the session, also, if
your search is supposed to by dynamic.

To find out how the view has to look like, just look at how 'index'
views are baked by the bake script (bake console shell, as of now).


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: How paginate results of search?

2007-05-22 Thread Brian Hartvigsen

The manual page on models has an entry on findAll() that includes
information on using $pages.  Using that and findCount() should make
it easy to make a number bar of pages.  I haven't actually done this
myself yet, but that's where I would start ;)

-- Brian

On May 22, 8:48 pm, hostdesigner <[EMAIL PROTECTED]> wrote:
> Like know how paginate results of search with cakePHP, I know do with
> PHP, but in cakePHP...
>
> Thanks!


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



How paginate results of search?

2007-05-22 Thread hostdesigner

Like know how paginate results of search with cakePHP, I know do with
PHP, but in cakePHP...

Thanks!


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---