Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ClassRegistry::init("Website")->recursive = 0;
- $this->paginate = array(
- "fields" => "Website.id, Website.title, Website.url, Website.display_image, Website.founder",
- "contain" => array(
- "Rating" => array(
- "fields" => "SUM(Rating.score) as total, COUNT(*) as count",
- "conditions" => array("Rating.website_id" => "Website.id"),
- ),
- "Country" => array("fields" => "Country.name"),
- "WebsitesCategory"
- ),
- "order" => "field(Website.id, $user_cat_list) DESC",
- "limit" => 15,
- );
- $websites = $this->Paginator->paginate("Website");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement