CakePHP 2.4.9: using data from two databases from controller -
i have 2 databases identical tables (one regular use, 1 update purposes). want able access data both of them. code i'm using:
$this->channel->usedbconfig = 'default'; debug($this->channel->find('count')); // output: 641939, correct! $this->channel->usedbconfig = 'update'; debug($this->channel->find('count')); // output: 641939, wrong, should 641938
the second usedbconfig isn't working. it's still manipulating data default datasource instead of update datasource. guess has default datasource being used right before it. how can access update database immediately after using default one?
Comments
Post a Comment