當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Database_Result::__construct方法代碼示例

本文整理匯總了PHP中Database_Result::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Database_Result::__construct方法的具體用法?PHP Database_Result::__construct怎麽用?PHP Database_Result::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Database_Result的用法示例。


在下文中一共展示了Database_Result::__construct方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

	public function __construct($result, $sql, $as_object = FALSE, array $params = NULL)
	{
		parent::__construct($result, $sql, $as_object, $params);

		// Find the number of rows in the result
		$this->_total_rows = mysql_num_rows($result);
	}
開發者ID:nevermlnd,項目名稱:cv,代碼行數:7,代碼來源:result.php

示例2: __construct

	public function __construct($result, $sql, $as_object)
	{
		parent::__construct($result, $sql, $as_object);

		// Find the number of rows in the result
		$this->_total_rows = mysql_num_rows($result);
	}
開發者ID:nasumi,項目名稱:fuel,代碼行數:7,代碼來源:result.php

示例3: __construct

	public function __construct(array $result, $sql, $as_object = NULL)
	{
		parent::__construct($result, $sql, $as_object);

		// Find the number of rows in the result
		$this->_total_rows = count($result);
	}
開發者ID:nevermlnd,項目名稱:cv,代碼行數:7,代碼來源:cached.php

示例4: __construct

 public function __construct($result, $sql, $as_object = FALSE, $params = NULL, $total_rows = NULL)
 {
     parent::__construct($result, $sql, $as_object, $params);
     if ($as_object === TRUE) {
         $this->_as_object = 'stdClass';
     }
     if ($total_rows !== NULL) {
         $this->_total_rows = $total_rows;
     } else {
         switch (pg_result_status($result)) {
             case PGSQL_TUPLES_OK:
                 $this->_total_rows = pg_num_rows($result);
                 break;
             case PGSQL_COMMAND_OK:
                 $this->_total_rows = pg_affected_rows($result);
                 break;
             case PGSQL_BAD_RESPONSE:
             case PGSQL_NONFATAL_ERROR:
             case PGSQL_FATAL_ERROR:
                 throw new Database_Exception(':error [ :query ]', array(':error' => pg_result_error($result), ':query' => $sql));
             case PGSQL_COPY_OUT:
             case PGSQL_COPY_IN:
                 throw new Database_Exception('PostgreSQL COPY operations not supported [ :query ]', array(':query' => $sql));
             default:
                 $this->_total_rows = 0;
         }
     }
 }
開發者ID:alekseyshavrak,項目名稱:3cx,代碼行數:28,代碼來源:Result.php

示例5: __construct

 public function __construct(array $result, $sql, $as_object = NULL)
 {
     if (count($result) > 0) {
         // Determine if we stored as objects or associative arrays
         $as_object = get_class($result[0]);
     }
     // If there are no results, we don't care how they're returned
     parent::__construct($result, $sql, $as_object);
     // Find the number of rows in the result
     $this->_total_rows = count($result);
 }
開發者ID:jimktrains,項目名稱:rccms,代碼行數:11,代碼來源:cached.php

示例6: __construct

 public function __construct(array $result, $sql, $as_object = NULL)
 {
     parent::__construct($result, $sql, $as_object);
     $this->_total_rows = count($result);
 }
開發者ID:noikiy,項目名稱:kohana,代碼行數:5,代碼來源:Cached.php

示例7: __construct

 public function __construct($result, $sql, $as_object)
 {
     parent::__construct($result, $sql, $as_object);
     $this->_total_rows = mysql_num_rows($result);
 }
開發者ID:noikiy,項目名稱:kohana,代碼行數:5,代碼來源:Result.php


注:本文中的Database_Result::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。