Skip to content

Instantly share code, notes, and snippets.

@violetyk
Created November 11, 2011 10:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save violetyk/1357650 to your computer and use it in GitHub Desktop.
Save violetyk/1357650 to your computer and use it in GitHub Desktop.
[cakephp]Matchablebehaviorを使ってHABTMのpaginate
<?php
$this->paginate['Content'] = array(
'jointo' => array(
'Tag',
),
'conditions' => array(
'Tag.id' => array(1,2)
),
'group' => 'Content.id',
);
$this->set('contents', $this->paginate('Content'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment