In Cake each table can be represented by a model.  If you want to
change data in a table, do it through that table's model.  This may
mean something like

function doAdminStuff()
{
  $this->Model1->cleanUp();
  $this->Model2->runScheduledTasks();
}

in your "admin" model.  Even with useTable = false, I would expect you
can still have $this->query() if you need to execute some SQL
directly.

However, perhaps post more about what you structure is - it sounds
like there would be a better way.  Controllers should not need to call
other controllers (except in rare cases) - the vast majority of your
application code should be in models / components, which can be
executed from any controller action.


On Oct 4, 3:18 am, rpupkin77 <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a model for administering a site, it itself does not connect to
> any table so I have $useTable = false. And in the controller, I have
> most of the data being handled by using other controllers' actions.
>
> There is one instance in which I need this model to access the
> database, however.  How do I give this model database connectivity if
> I am not using a table. Another question I have is, can I pass form
> data as POST from on controller to another?
>
> I have looked through the API, but I find it a little hard to
> understand without examples.


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

Reply via email to