The name of your model doesn't correspond with your controller.
Your controller name should be talent_detail_controller if you want to
keep it that way, but I'm guessing you want it to show up in your
browser as /talent/.
So, in order to fix this you'll want to add $uses =
array('TalentDetail'); to the top of your controller.
Your controller would look like this:
<?php
class TalentController extends AppController {
$name = 'Talent';
$uses = array('TalentDetail');
$components .......
}
?>
$uses will then load talentdetail as a variable you can use in your
controller.
Hope this helps :)
housebolt
On Aug 19, 2:22 pm, peterhf <[EMAIL PROTECTED]> wrote:
> A table in the db: talent_details
>
> The model:
>
> class TalentDetail extends AppModel
> {
> var $name = 'TalentDetail';
> var $primaryKey = 'recordID';
>
> }
>
> In the controller talent_controller:
>
> $this->TalentDetail->id = 10;
> $result = $this->TalentDetail->exits();
>
> Result:
>
> Fatal error: Call to undefined function: exists() in /home/myact1/
> public_html/cake/app/controllers/talent_controller.php on line 260
>
> I had previously tried:
>
> $conditions = array('userID' => 10);
> $result = $this->TalentDetail->find($conditions, 'recordID', null,
> null);
>
> Result:
>
> Fatal error: Call to undefined function in /home/myact1/public_html/
> cake/app/controllers/talent_controller.php on line 258
>
> It would appear that my model is not being recognized.
>
> Thoughts?
>
> Peter -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---