Note: the second table name is server_infos (wrongly typed as
server_info in my previous mail)

On Sat, Sep 25, 2010 at 6:54 AM, Ancy DSouza <ancyc...@gmail.com> wrote:
> I am new to CakePHP and this is my first question in this group.
> Would be greatly appreciate if you can able to help me out in the below 
> question
>
> How can I populate data belonging to TWO NON-RELATED TABLES in ONE Controller
>
> Example:
> I have two tables
>
> Table 1. members (id, member_name, member_email)
> Table 2. server_info(id, server_info, server_details)
>
> Table 1 will contain data like
>                id, member_name, member_email
>                '1','Member 1 Name','memb...@gmail.com'
>                '2','Member 2 Name','memb...@gmail.com';
>                '3','Member 3 Name','memb...@gmail.com';
>
>
> Table 2 will contain data like
>                id, server_info, server_details
>                '1','Host','smtp.gmail.com'
>                '2','Port','465';
>                '3','Username','My User Name';
>                '4','Password','My password';
>                '5','from','myn...@gmail.com';
>                '6','fromName','My Full Name';
>                '7','setReturnPath','myn...@gmail.com';
>                '8','NotifyReceipt','myn...@gmail.com';
>                '9','replyTo','myn...@gmail.com';
>
> Now I want to populate the data of both the tables in my Members controller.
>
> Now Members table can be populated in Members controller as below.
> $table = $this->Member->query("SELECT members.id, members.name,
> members.email FROM members");
>
> Now how can I populate server_info table in Members controller.
>
> I want to send emails to the data in Members table using the SMTP
> information available in server_info table.
>
> Thanking you,
> Yours sincerely
> - Ancy
>

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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to