示例#1
0
 public function getConnection()
 {
     if (self::$connection) {
         $this->setConnection(app::getConnection());
     }
     return self::$connection;
 }
示例#2
0
 public function selectAction()
 {
     //$hlp = new service_helper_sql();
     $sql = urldecode($this->getRequest()->getParam('select', null));
     service_helper_sql::assertSqlReadonly($sql);
     $stmt = app::getConnection()->prepare($sql);
     $stmt->execute();
     $all = $stmt->fetchAll(pdo::FETCH_ASSOC);
     //echo '<pre>';
     //print_r($all);
     echo service_helper_csv::arraysToCsv($all);
 }
示例#3
0
文件: db.php 项目: vgalitsky/moze
 public function __construct()
 {
     $this->setConnection(app::getConnection());
 }