On Sat, Dec 18, 2010 at 1:01 AM, ionatan wrote:
> And in what controller should I use this paginator?! I'm still a bit
> confuse.
For the third time, it could be in either. However, from the way that
you described the requirement for doing this, it probably makes more
sense to put it in Categorie
And in what controller should I use this paginator?! I'm still a bit
confuse.
On Dec 17, 11:56 pm, cricket wrote:
> On Fri, Dec 17, 2010 at 2:22 PM, ionatan wrote:
> > I need to add products in a category, and for this I need to see all
> > products that are NOT (already) IN that category
>
> Th
On Fri, Dec 17, 2010 at 2:22 PM, ionatan wrote:
> I need to add products in a category, and for this I need to see all
> products that are NOT (already) IN that category
That makes sense. The conditions I posted should be the simplest
solution. Just set $this->paginate['conditions'] in your actio
/view/74/Complex-Find-Conditions near the bottom
there.
Dave
-Original Message-
From: ionatan [mailto:ipiona...@gmail.com]
Sent: December-17-10 5:02 AM
To: CakePHP
Subject: Paginator with "NOT IN"
Hello, I have a table products, a table categories and a table
categories_product
I need to add products in a category, and for this I need to see all
products that are NOT (already) IN that category
On Dec 17, 6:51 pm, cricket wrote:
> On Fri, Dec 17, 2010 at 3:32 AM, ionatan wrote:
> > Hello, I have a table products, a table categories and a table
> > categories_products wi
On Fri, Dec 17, 2010 at 3:32 AM, ionatan wrote:
> Hello, I have a table products, a table categories and a table
> categories_products with category_id, product_id as foreign keys.
>
> I need to make a paginator to display all products that not belong to
> the selected category.
That seems a bit
I think this can resolve your problem but isn't the better solution.
$categorieProducts = $this->CategorieProducts->find('list', 'fields'
=> array('category_id'), array('conditions' =>
array('CategorieProducts.category_id' => $category_id)));
$products = $this->Product->find('all',
Hello, I have a table products, a table categories and a table
categories_products with category_id, product_id as foreign keys.
I need to make a paginator to display all products that not belong to
the selected category.
Something like this:
SELECT * FROM products WHERE id NOT IN (SELECT product