I need to base a model on a SQL View so I've set $useTable=false.  All
I really want to do is pull this multi-join view from the DB instead
of using the application to try and build a very custom query.  Even
though I've set the $useTable variable to false, Cake still looks for
the table underneath (or at least that's what it says it's doing).

I've attached the model code below. Obviously, It's quite a simple
operation, but it just won't work.

I'm new to Cake but not PHP, so I may be missing something
fundamental.  Any help would be greatly appreciated.

-Chris

----------------------------------------------------------
class EventCalendar extends AppModel
{
    var $name = 'EventCalendar';
    var $useTable = false;

    function index(){
        $this->query('SELECT id, account_id, company_name, event_name,
start_date, end_date, lead_name, days_to_event, open_tasks,
overdue_tasks FROM vw_eventscalendar WHERE account_id=1');
    }
}
-----------------------------------------------------------

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