hi,

i am trying to delete a record from a table. to do that i call a
different model from my controller. anyway, i can retrieve the correct
data perfectly, that tells me the process is right. but i can't delete
a specifi record. first i declared the foreign model in my controller

var $uses = array('User', 'Test');

now i am retreiving the first record from that table, "tests". it
happens in my controller:

    function __getRecord()
    {
        $erg = $this->Test->find('first');
        $id = $erg['Test']['id'];

                $this->set('proxies', $erg);
                                      return $erg['Test']['name'];
                $this->Test->delete($id);
    }

After i got it i want to delete it from the table so i am passing the
$id to the delete function. but cake just wont delete the record.

i checked. the correct id is passed...

i am calling this function like
$this->Session->write('abc.test', $this->__getRecord());


can u see the problem? looking forward to your help :)
THX

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

Reply via email to