It is my product Model

class product extends AppModel
{
 var $name = 'Product';
 var $primaryKey = 'productId';
 var $validate = array(
       'productName'  => VALID_NOT_EMPTY,
   );

 var $belongsTo = array(
        'Category' => array(
            'className'  => 'category',
            'foreignKey' => 'categoryId',
        )
    );

}

and it is my category model:

class category extends AppModel
{
 var $name = 'Category';
 var $primaryKey = 'categoryId';
 var $validate = array(
       'categoryName'  => VALID_NOT_EMPTY,
   );
}

I want to make a drop down of categories from category table in
Product page.
How to do it? Please help me.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to