Thanks to this article:
http://cakebaker.42dh.com/2007/10/17/pagination-of-data-from-a-habtm-relationship/
Form categories controller Im displaying all the Listings name and
description from a given category($current_id)
class CategoriesController extends AppController {
function index($current_id) {
$data = $this->paginate('CategoriesListing',
array('Category.id' => $current_id));
debug($data);
exit;
}
}
Listing belongsTo Country:
My problem now is, from the above index action from Categories
Controller, how do i get also the Country.name of a Listing from a
given category?
Any help is welcome, thanks in adavance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---