Why do you need to do that?

Anyway, assuming you have a reason, the best place to set it would be
the constructor of the model:

class SillyTest extends AppModel {
  var $name = "SillyTest";
  var $useTable = 'dummy';

  function __construct() {
    if (mt_rand(0, 100) < 30) {
      $this->useTable = 'other_table';
    }
  }
  parent::__construct();
}

Hope this helps!

On May 23, 9:19 am, Anton Morrison <[EMAIL PROTECTED]> wrote:
> Hi I am wondering if anyone can help me find a way to set the
> $useTable dynamically.
>
> I want to set it depending on a Session variable.
>
> thanks


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to