Have you instantiated the Myemail model? AFAIK App::Import basically includes the php file... to get an instance of the class you still need to do something along the lines of
$this->Myemail = new Myemail Also, make sure you have the model name correct(since if your table was my_emails, cake would expect your model to be MyEmail) On Jun 11, 8:20 am, "jitendra.rathod" <[email protected]> wrote: > Notice: Undefined property: AppController::$Myemail in > /var/www/app/app_controller.php on line 55 > > here Myemail is the my model name and I am calling AppController method from > app/vendors/shell/xyz.php file. > > I had write below three line code in starting of my xyz.php file > > App::import('Core', 'Controller'); > App::import('Controller', 'app_'); > App::import('Model', 'Myemail'); > > this error shows on my below AppController file sentence. > > $arrEmail = $this->Myemail->findById($intEmailid); > > Plz reply ASAP. Waiting for reply. > > Thanks, > Jitendra > -- > View this message in > context:http://old.nabble.com/used-model-in-AppController-gives-error-in-vend... > Sent from the CakePHP mailing list archive at Nabble.com. 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 [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
