On Jul 26, 2006, at 7:59 AM, [EMAIL PROTECTED] wrote:
>
> Hi!
>
> If i made class "photo" i've got error "table photos not found". But i
> don't want use this table in this model. I know - var $useTable =
> false; but i want use in this model few others tables.
> What i've to do?
A model only uses one table. Setting it equal to false assumes that
you don't want to use *any* table. If you want this model to use
another table in the database besides 'photos', the supply that name:
var $useTable = 'another_table_name';
> And second question:
> i've many queries like this "DESC `photos`". How to turn off this?
Set DEBUG to 0 in /app/config/core.php. Once this is done Cake caches
your model definitions and doesn't need to execute the DESC queries
anymore.
> I don't wanna use $this->findAll. I like normal $this->query("SELECT *
> ...).
That's fine, but you'll miss out on a lot of free functionality and
ease of use (re: maintainability). Might as well use mysql_query(). ;)
-- John
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---