Hi jojiju,

See the book:

http://book.cakephp.org/view/24/Model-and-Database-Conventions

"Join tables, used in hasAndBelongsToMany (HABTM) relationships
between models should be named after the model tables they will join
in alphabetical order (apples_zebras rather than zebras_apples)".

Therefore  employees_accreditations should be
accreditations_employees.

HTH

On Sep 28, 12:58 pm, jojiju <[EMAIL PROTECTED]> wrote:
> hi all,
>     I have  tables employees and accreditations and join table called
> employees_accreditations. now I want to build the edit form which
> should populate the information both from employees and
> accreditations. its driving me crazy please help.
>
> <div>
>
>                 <fieldset>
>                         <legend><?php __('Edit Employee'); ?></legend>
>                                         <?php
>                                         echo 
> $form->create('EmployeesAccreditation');
>                                         echo 
> $form->input('id',array('type'=>'hidden'));
>                                         echo $form->input('card_no');
>                                         echo 
> $form->input('card_expiry_date',array('type'=>'text'));
>                                         echo $form->input('first_name');
>                                         echo $form->input('surname');
>                                         echo $form->input('date_of_birth');
>                                         echo 
> $form->input('street_no_and_name');
>                                         echo $form->input('suburb');
>                                         echo $form->input('state');
>                                         echo $form->input('post_code');
>                                         echo $form->input('telephone_number');
>                                         echo $form->input('mobile_number');
>                                         echo 
> $form->input('driving_license_number');
>                                         echo $form->input('position_title');
>                                         echo 
> $form->input('employer_company_name');
>                                         echo 
> $form->input('employer_contact_person_name');
>                                         echo 
> $form->input('employer_department');
>                                         echo 
> $form->input('employer_telephone_number');
>                                         echo 
> $form->input('employer_mobile_number');
>                                         echo 
> $form->input('employer_fax_number');
>                                         echo 
> $form->input('employer_email_address');
>                                         echo 
> $form->input('employer_street_no_and_name');
>                                         echo $form->input('employer_po_box');
>                                         echo $form->input('employer_suburb');
>                                         echo $form->input('employer_state');
>                                         echo 
> $form->input('employer_post_code');
>                                         echo 
> $form->input('allergy_description');
>                                         echo $form->input('sub_category',
> array('type'=>'select','options'=>array('M'=>'M')));?>
>                                         <legend><?php __('Edit 
> Accreditations'); ?></legend>
>                                 <?php
>                                         echo 
> $form->input('Accreditation.accreditation_id',
> array('type'=>'select','options'=>$accreditationList,'selected' =>
> $preferenceaccreditation,'label' => __('Accreditation Name', true)));
>                                         echo 
> $form->input('Accreditation.certification_number');
>                                         echo 
> $form->input('Accreditation.issue_date',array('type'=>'text'));
>                                         echo $form-
> >input('Accreditation.expiry_date',array('type'=>'text'));
>                                         echo $form-
> >input('Accreditation.due_date_assignments',array('type'=>'text'));
>
>                                         echo $form->submit('Edit');
>                                         echo $form->end();
>                                 ?>
>                 </fieldset>
>         </div>
--~--~---------~--~----~------------~-------~--~----~
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