helpers are for views.  If you search google groups for helpers in
controllers you should find some information  (it might be with
components and helpers)

you might also find something here

http://groups.google.com/group/cake-php/web/faq


Sam D

On Mon, May 5, 2008 at 4:52 AM, LukeLambert <[EMAIL PROTECTED]> wrote:
>
>  First, let me say that I'm really new to CakePHP so I have a lot to
>  learn.
>
>  I'm having trouble figuring out how to use TimeHelper within a
>  controller (specifically the daysAsSql function). I understand that
>  helpers are meant to be used in views, but I really need to use this
>  in my controller. I have included the following line at the opening of
>  my controller:
>
>  var $helpers = array('Time');
>
>  I want to do something like this in my index function:
>
>  $range = $this->Time->daysAsSql($begin, $end, NULL, true);
>
>  That's not working for me, however. Is there some way I can use this
>  function in my controller? If it's now supposed to be used here, then
>  where? I can't image a reason for using it in a view.
>
>  Thanks,
>  Luke
>
>  >
>



-- 
-- 
(the old fart) the advice is free, the lack of crankiness will cost you

- its a fine line between a real question and an idiot

http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/
http://blog.samdevore.com/cakephp-pages/my-cake-wont-bake/
http://blog.samdevore.com/cakephp-pages/i-cant-bake/

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

  • TimeHelper LukeLambert
    • Re: TimeHelper Samuel DeVore

Reply via email to