dynamically setting the $useTable

2007-05-23 Thread Anton Morrison
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

Re: dynamically setting the $useTable

2007-05-23 Thread grigri
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

Re: dynamically setting the $useTable

2007-05-23 Thread grigri
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

Re: dynamically setting the $useTable

2007-05-23 Thread gwoo
setSource --~--~-~--~~~---~--~~ 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