當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。