Hm, thanks, but i think i need a little more help.

nate wrote:
> Assuming you have 2 different database configurations in database.php
> (we'll call them $default and $user), this should be pretty
> straightforward.

The point of having two different configurations is that the models
using the default configuration won't be affected by the reconnect call
below. Is that correct?


> ConnectionManager::getDataSource('user')->reconnect(array('host' =>
> 'localhost', ...., 'prefix' => $prefix));

This should be placed in a controller, right? Can this be executed even
if the current model doesn't and shouldn't use the $user configuration
and the custom prefix?


Now let me explain my current problem:
Let's say that i, for example, have two user-specific tables, with the
prefix "prefix_", called "prefix_table1" and "prefix_table2". When
doing like you said, Cake tells me that the tables "table1" and
"table2" (without the prefixes) are missing and have to be created.

I tried to create those tables just to see if that could make it work,
but then the tables without prefixes are used, instead of the ones with
prefixes.

Then i removed those again and tried to add this in every model using
user-specific tables:
var $useTable = false;
I did this to stop cake from reading tables until i did the reconnect,
but that only gave me a bunch of notices, warnings and errors.

So, how do i do now?


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

Reply via email to