This seems to be a recurring post from you on the same subject - are you taking
any notice at all of replies you get or are we all wasting our time?
What errors are you getting?
Jeremy Burns
jeremybu...@me.com
On 5 May 2010, at 09:09, Master Ram wrote:
> hi.. all
>
> i am joining 2 tables table: table name is fixed table 1. adb_campaign
> and 2. adb_users.
>
> these two tables i ma joining.
>
> adb_campaign table containing user_id(adb_user table) form that i want
> to get the user details.
>
> this is my campaign.php module code:
> class Campaign extends AppModel
> {
>var $useTable ='adb_campaign'; //the actual name of the table in
> the database
>var $belongsTo = 'User';
>
> }
> ?>
>
> this is my users.php module code:
>
> class User extends AppModel {
>
>var $tablePrefix = 'adb_';
>var $hasMany = 'Campaign';
> }
> ?>
>
> my controller are. users_controller.php code:
>
> class UsersController extends AppController {
>
>var $tablePrefix = 'adb_';
> // var $scaffold;
>
>var $uses=array('Client','User');
>
>var $helpers = array('Html', 'Form');
>
>function mycampaigns_results() {
>
>$this->Client->recursive = 1;
>
>$clients = $this->Client->find('all');
>
>$this->set('clients',$clients);
>
>}
> }
> ?>
> my controller are. campaigns_controller.php code:
>
> class CampaignsController extends AppController {
>
>var $name = 'Campaigns';
>//var $scaffold;
>
>var $uses = array('Client','User','Campaign');
>
>var $helpers = array('Html', 'Form');
>
>function mycampaigns_results() {
>
> /*$clients = $this->Client->find('all',
> array(
> 'fields' =>
> 'client_name'));
>$this->set('clients',$clients);
>$this->Campaign->recursive = 1;*/
>$campaigns = $this->Campaign->find('all');
>
>$this->set('campaigns',$campaigns);
>}
> }
> ?>
>
>
> and my view page is: mycampaigns_results.ctp code:
>
>border="0"class='general_content_font' style='width:100%;
> align="center">
>
>#Job No.
>Campaign Name
>Campaign Date
>Status
>
>
>
>if ( ( $campaign['Campaign']['campaign_id'] % 2) == 0 )
>$bg_color = "#F2F2F2";
>else
>$bg_color = "#FFF";?>
>
>
>
>link($campaign['Campaign']
> ['campaign_name'],
> user_assign,
> array('class' =>'url4_font')));?>
>
>
>
>
>
>
>
>
> where i did the mistake...
>
> please help me
>
> 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
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