hi all

i have an application based on cakephp

in the controller, i'm using more than one model.

the code :

<?php

class TransactionInvoicesController extends AppController
{
        var $name               = "TransactionInvoices";
        var     $layout         = "back";
        var $component  = array("RequestHandler");
        var $helpers    = array("Javascript","Form","Ajax","Format");
        var $uses               = array
("TransactionRequest","TransactionTransfer","TransactionInvoice","TransactionReject","TransactionCancel");

        function action()
        {
                if(!empty($this->data) && 
!empty($this->data['TransactionInvoice']
['action'])) :

                        $userrole       = $this->Session->Read('userrole');
                        $action         = 
$this->data['TransactionInvoice']['action'];

                        $conditions     = array(
                                                                
'TransactionInvoice.action'     => "'".$action."'",
                                                                
'TransactionInvoice.action_date'=> "'".date('Y-m-d')."'",
                                                       );

                        if($userrole == 'buyer') :

                                $conditions['TransactionInvoice.buyer_id'] = 
$this->Session->Read
('buyer_id');

                        elseif($userrole == 'distro') :

                                $conditions['Product.distro_id'] = 
$this->Session->Read
('distro_id');

                        endif;

                        $this->TransactionInvoice->UpdateAll($conditions,array
("TransactionInvoice.id IN (".$this->data['TransactionInvoice']
['id'].")"));

                        //create new transaction transfer data

                        if($action == 'accept') :

                                $data = array();

                                $this->TransactionTransfer->Create($data);

                                $data['TransactionTransfer'] = array(
                                        'buyer_id'              => 
$this->Session->Read('buyer_id'),
                                        'distro_id'             => 
$this->data['TransactionInvoice']['distro_id'],
                                        'product_id'    => 
$this->data['TransactionInvoice']['product_id'],
                                        'transaction_request_id'        => 
$this->data['TransactionInvoice']
['transaction_request_id'],
                                        'action'                => 'wait',
                                );

                                $this->TransactionTransfer->Save($data);

                        endif;

                endif;

        }

}

the problem is $this->TransactionTransfer->Save($data);
i'm using develope mode no 2, and there isn't any query data in log
i dont know, but in other controllers, there is nothing error

would you like to 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