Hi
I have a simple console script called alert.php in /vendors/shells. I
am using only one model. I have it define with the $uses var and I am
trying to execute a findAll method on Model. I know this model works
becuase I use the same one in several controllers in my main
application. Each time I run the console script it tells me that the
model is missing. Below is the actual code I have. Is there
something I'm missing?
<begin snippet>
class AlertShell extends Shell
{
var $uses = array('Threshold');
function main()
{
$alert_count = 0;
$thresholds =
$this->Threshold->findAll(array('next_alert'=>date('Y-
m-d'), 'target_date'=>'>=' . date('Y-m-d')));
}
<end snippet>
when I run this with: > cake alert I get the following error: Error:
Missing model 'Threshold'
I have added the cake console directory to my path
thanks for your help!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---