当前位置: 首页>>代码示例>>PHP>>正文


PHP LogMaster类代码示例

本文整理汇总了PHP中LogMaster的典型用法代码示例。如果您正苦于以下问题:PHP LogMaster类的具体用法?PHP LogMaster怎么用?PHP LogMaster使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了LogMaster类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: query

 public function query($sql)
 {
     LogMaster::log($sql);
     $res = sasql_query($this->connection, $sql);
     if ($res === false) {
         throw new Exception("SaSQL operation failed\n" . sasql_error($this->connection));
     }
     $this->last_result = $res;
     return $res;
 }
开发者ID:elsonvinicius,项目名称:framework,代码行数:10,代码来源:db_sasql.php

示例2: query

 public function query($sql)
 {
     LogMaster::log($sql);
     if ($this->start_from) {
         $res = sqlsrv_query($this->connection, $sql, array(), array("Scrollable" => SQLSRV_CURSOR_STATIC));
     } else {
         $res = sqlsrv_query($this->connection, $sql);
     }
     if ($res === false) {
         $errors = sqlsrv_errors();
         $message = array();
         foreach ($errors as $error) {
             $message[] = $error["SQLSTATE"] . $error["code"] . $error["message"];
         }
         throw new Exception("SQLSrv operation failed\n" . implode("\n\n", $message));
     }
     if ($this->insert_operation) {
         sqlsrv_next_result($res);
         $last = sqlsrv_fetch_array($res);
         $this->last_id = $last["dhx_id"];
         sqlsrv_free_stmt($res);
     }
     if ($this->start_from) {
         $data = sqlsrv_fetch($res, SQLSRV_SCROLL_ABSOLUTE, $this->start_from - 1);
     }
     return $res;
 }
开发者ID:rokkit,项目名称:temp,代码行数:27,代码来源:db_sqlsrv.php

示例3: getFilesList

 private function getFilesList($path, $relation)
 {
     $fileSystemTypes = FileSystemTypes::getInstance();
     LogMaster::log("Query filesystem: " . $path);
     $dir = opendir($path . '/' . $relation);
     $result = new FileSystemResult();
     // forms fields list
     for ($i = 0; $i < count($this->config->data); $i++) {
         $fields[] = $this->config->data[$i]['db_name'];
     }
     // for every file and directory of folder
     while ($file = readdir($dir)) {
         // . and .. should not be in output list
         if ($file == '.' || $file == '..') {
             continue;
         }
         $newFile = array();
         // parse file name as Array('name', 'ext', 'is_dir')
         $fileNameExt = $this->parseFileName($path . '/' . $relation, $file);
         // checks if file should be in output array
         if (!$fileSystemTypes->checkFile($file, $fileNameExt)) {
             continue;
         }
         // takes file stat if it's need
         if (in_array('size', $fields) || in_array('date', $fields)) {
             $fileInfo = stat($path . '/' . $file);
         }
         // for every field forms list of fields
         for ($i = 0; $i < count($fields); $i++) {
             $field = $fields[$i];
             switch ($field) {
                 case 'filename':
                     $newFile['filename'] = $file;
                     break;
                 case 'full_filename':
                     $newFile['full_filename'] = $path . "/" . $file;
                     break;
                 case 'size':
                     $newFile['size'] = $fileInfo['size'];
                     break;
                 case 'extention':
                     $newFile['extention'] = $fileNameExt['ext'];
                     break;
                 case 'name':
                     $newFile['name'] = $fileNameExt['name'];
                     break;
                 case 'date':
                     $newFile['date'] = date("Y-m-d H:i:s", $fileInfo['ctime']);
                     break;
             }
             $newFile['relation_id'] = $relation . '/' . $file;
             $newFile['safe_name'] = $this->setFileName($relation . '/' . $file);
             $newFile['is_folder'] = $fileNameExt['is_dir'];
         }
         // add file in output list
         $result->addFile($newFile);
     }
     return $result;
 }
开发者ID:ValentinNikolaev,项目名称:Laravel5-dhtmlxScheduler-demo,代码行数:59,代码来源:db_filesystem.php

示例4: query

 public function query($sql)
 {
     LogMaster::log($sql);
     $res = pg_query($this->connection, $sql);
     if ($res === false) {
         throw new Exception("Postgre - sql execution failed\n" . pg_last_error($this->connection));
     }
     return $res;
 }
开发者ID:sugarnet,项目名称:feanor-sg1,代码行数:9,代码来源:db_postgre.php

示例5: query

 public function query($sql)
 {
     LogMaster::log($sql);
     $res = $this->connection->query($sql);
     if ($res === false) {
         throw new Exception("MySQL operation failed\n" . $this->connection->error);
     }
     return $res;
 }
开发者ID:neohusky,项目名称:demo,代码行数:9,代码来源:db_mysqli.php

示例6: query

 public function query($sql)
 {
     LogMaster::log($sql);
     $res = $this->connection->query($sql);
     if ($res === false) {
         throw new Exception("PDO - sql execution failed\n" . $this->connection->errorInfo());
     }
     return new PDOResultSet($res);
 }
开发者ID:tmlsoft,项目名称:main,代码行数:9,代码来源:db_pdo.php

示例7: query

 public function query($sql)
 {
     LogMaster::log($sql);
     $res = $this->connection->query($sql);
     if ($res === false) {
         throw new Exception("SQLLite - sql execution failed\n" . $this->connection->lastErrorMsg());
     }
     return $res;
 }
开发者ID:jekay100,项目名称:xwtec,代码行数:9,代码来源:db_sqlite3.php

示例8: query

 public function query($query)
 {
     LogMaster::log($query);
     $res = mysql_query($query, $this->connection);
     if (mysql_errno() != 0) {
         LogMaster::log($this->error());
     }
     return $res;
 }
开发者ID:nilBora,项目名称:konstruktor,代码行数:9,代码来源:mysql.php

示例9: query

 public function query($sql)
 {
     LogMaster::log($sql);
     $res = $this->connection->query($sql);
     if ($res === false) {
         throw new Exception("CI - sql execution failed");
     }
     return new PHPCIResultSet($res);
 }
开发者ID:rokkit,项目名称:temp,代码行数:9,代码来源:db_phpci.php

示例10: query

 public function query($sql)
 {
     LogMaster::log($sql);
     $res = sqlite_query($this->connection, $sql);
     if ($res === false) {
         throw new Exception("SQLLite - sql execution failed\n" . sqlite_error_string(sqlite_last_error($this->connection)));
     }
     return $res;
 }
开发者ID:neohusky,项目名称:demo,代码行数:9,代码来源:db_sqlite.php

示例11: query

 public function query($sql)
 {
     if ($this->last_result) {
         $this->last_result->closeCursor();
     }
     LogMaster::log($sql);
     $this->last_result = $res = $this->connection->query($sql);
     if ($res === false) {
         throw new Exception("PDO - sql execution failed\n" . $this->connection->errorInfo());
     }
     return $res;
 }
开发者ID:Jellious,项目名称:test2223,代码行数:12,代码来源:db_pdo.php

示例12: query

 public function query($sql)
 {
     LogMaster::log($sql);
     $res = $this->connection->query($sql);
     if ($res === false) {
         throw new Exception("CI - sql execution failed");
     }
     if (is_object($res)) {
         return new PHPCIResultSet($res);
     }
     return new ArrayQueryWrapper(array());
 }
开发者ID:marianolg,项目名称:rosbaco,代码行数:12,代码来源:db_phpci2.php

示例13: query

 public function query($sql)
 {
     LogMaster::log($sql);
     $res = mssql_query($sql, $this->connection, $this->start_from === false ? 10 : 0);
     if ($this->insert_operation) {
         $last = mssql_fetch_assoc($res);
         $this->last_id = $last["dhx_id"];
         mysql_free_result($res);
     }
     if ($this->start_from !== false) {
         mssql_data_seek($res, $this->start_from);
     }
     return $res;
 }
开发者ID:Jellious,项目名称:test2223,代码行数:14,代码来源:db_mssql.php

示例14: query

 public function query($sql)
 {
     LogMaster::log($sql);
     if (is_array($sql)) {
         $res = $this->connection->SelectLimit($sql['sql'], $sql['numrows'], $sql['offset']);
     } else {
         $res = $this->connection->Execute($sql);
     }
     if ($res === false) {
         throw new Exception("ADODB operation failed\n" . $this->connection->ErrorMsg());
     }
     $this->last_result = $res;
     return $res;
 }
开发者ID:kraaden,项目名称:scheduler,代码行数:14,代码来源:db_adodb.php

示例15: parse_request

 function parse_request()
 {
     parent::parse_request();
     if (isset($_GET["pos"])) {
         if (!$this->dload) {
             LogMaster::log("Dyn loading request received, but server side was not configured to process dyn. loading. ");
         } else {
             $this->request->set_limit($_GET["pos"], $this->dload);
         }
     }
     if (isset($_GET["mask"])) {
         $this->request->set_filter($this->config->text[0]["db_name"], $_GET["mask"] . "%", "LIKE");
     }
     LogMaster::log($this->request);
 }
开发者ID:ValentinNikolaev,项目名称:Laravel5-dhtmlxScheduler-demo,代码行数:15,代码来源:combo_connector.php


注:本文中的LogMaster类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。