Hi folks,
I have a tbl called main_categories
tbl schema is
main_category_id , main_category,type,active,deleted
model data maincategory.php
class MainCategory extends AppModel {
var $name = 'MainCategory';
var $primaryKey = 'main_category_id';
var $hasMany = array(
'SubCategory' => array(
'className' => 'SubCategory',
'foreignKey' =>
'main_category_id',
'dependent' => false,
'conditions' => '',
'fields' => '',
'order' =>
'MainCategory.mainCategory ASC',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''),);
}
in the main_categories_controller.php
if ( $_POST['a'] == "Update") {
//$this->MainCategory->recursive = 1;
$this->MainCategory->mainCategoryId = $_POST['id'];
$this->MainCategory->save($this->data);
}
Its not updating the record
$this->MainCategory->id = $_POST['id'];
$this->MainCategory->main_category_id = $_POST['id'];
not working
Please help me
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
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