rendered paste body 1 <?php 2 class testController extends AppController { 3 function main( ) { 4 $this->renderOtherView( 'newajax', 'main' ); 5 6 $th = $this->loadHelper('test'); 7 8 print_r ($th->nabCounters()); 9 }10 }11 ?>---------------------------------------------------------------- 1 <?php 2 class testHelper { 3 var $instance = null; 4 5 private function __construct() { 6 } 7 8 function getInstance() { 9 if (!$this->instance) {10 $this->instance = new testHelper();11 }1213 return $this->instance;14 }1516 function nabCounters() {17 return RobDB::getInstance()->queryCol('SELECT CID FROM Counter');18 }19 }20 ?>