Thank you for your fast response...

Thats on the controller i just generate the list of values and
save.Here is the controller
code.

<?php
class ServicesController extends AppController {
 var $name = 'Services';
 var $helpers = array('Html', 'Form', 'Habtm');


 function service()
 {
  $this->set('sizes_list', $this->Service->Size->generateList());
  $this->set('groups_list', $this->Service->Group->generateList());
  $this->set('payments_list', $this->Service->Payment-
>generateList());
    if (!empty($this->data))
        {
            if ($this->Service->save($this->data))
            {
    $this->redirect('personal');
            }
        }

   }

    function personal() {
   }
}
?>


And the model code is

<?php
class Service extends AppModel {
   var $name = 'Service';

   var $hasAndBelongsToMany = array('Size','Group','Payment' =>
        array('class' => 'Group',
        'joinTable'    => 'sizes_groups_payments',
        'foreignKey'   => 'size_id',
        'associationForeignKey'=> 'group_id',
        'conditions'   => '',
        'order'        => '',
         'limit'        => '',
         'unique'       => true,
         'finderQuery'  => '',
         'deleteQuery'  => '',
                               )
                               );

}
?>

I surelly believe that you can able to trace out where i had gone
wrong from this code.

Regards,
M.Raja

-
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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