Show
Ignore:
Timestamp:
10/02/08 18:12:10 (3 months ago)
Author:
nowelium
Message:

mysql の procedure サポートは終わり。
General error: 2014 Cannot execute queries while other unbuffered queries are active. とかは、PDOのPDO::MYSQL_ATTR_USE_BUFFERED_QUERY をいくら設定してもダメなので、少し逃げ。一端切断すればなんとかなるけど、Datasource設定とかは管理外なので、やらない。
multi rows は 2次元配列で。

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/php/misc/Hermit/src/Hermit/statement/HermitStatement.php

    r20387 r20492  
    44 * @author nowelium 
    55 */ 
    6 class HermitStatement { 
    7     protected $parameter; 
    8     protected $statement; 
    9     public function __construct(HermitSqlParameter $parameter, PDOStatement $statement){ 
    10         $this->parameter = $parameter; 
    11         $this->statement = $statement; 
    12     } 
    13     public function getSqlParameter(){ 
    14         return $this->parameter; 
    15     } 
    16     public function execute($parameterValue = array()){ 
    17         $this->parameter->bind($this->statement, $parameterValue); 
    18         return $this->statement->execute(); 
    19     } 
    20     public function fetch(){ 
    21         $args = func_get_args(); 
    22         $c = count($args); 
    23         if($c < 1){ 
    24             return $this->statement->fetch(); 
    25         } 
    26         if($c < 2){ 
    27             return $this->statement->fetch($args[0]); 
    28         } 
    29         return call_user_func_array(array($this->statement, 'fetch'), $args); 
    30     } 
    31     public function __call($name, $params){ 
    32         return call_user_func_array(array($this->statement, $name), $params); 
    33     } 
     6interface HermitStatement { 
     7    public function getSqlParameter(); 
     8    public function execute($parameterValue = array()); 
     9    public function __call($name, $params); 
    3410}