Re: about the controller insert data into two tables

2008-10-01 Thread techiguy
flyingfish, y dont y do like this way var $uses = array('User', 'Userfield'); function add() { $this->User->save($this->data); $this->Userfield->insertData($this-data); and in your Userfield model write the query to insert data into the database like this.. function insertData($arr)

about the controller insert data into two tables

2008-09-30 Thread flyingfish
hi everybody , now i have need to add user information into two tables ,one is users,the other is usefields , in model , user hasOne usefield now , i need to insert information into users and userfields at the same time, in my users_controller, i have the code like this var $uses = ar