Changeset 18098 for branches/comu-ver2/data/class/SC_DbConn.php
- Timestamp:
- 2009/06/12 14:45:35 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/data/class/SC_DbConn.php
r17595 r18098 27 27 $objDbConn = ""; 28 28 29 class SC_DbConn {29 class SC_DbConn { 30 30 31 31 var $conn; … … 86 86 87 87 if ($this->conn->isError($result) && !$ignore_err){ 88 $this->send_err_mail 88 $this->send_err_mail($result, $n); 89 89 } 90 90 … … 105 105 } 106 106 if ($this->conn->isError($result)){ 107 $this->send_err_mail ($result ,$n); 108 } 109 $this->result = $result; 110 111 return $this->result; 112 } 113 114 function getRow($n, $arr = ""){ 115 116 // mysqlの場合にはビュー表を変換する 117 if (DB_TYPE == "mysql") $n = $this->dbFactory->sfChangeMySQL($n); 118 119 if ( $arr ) { 120 $result = $this->conn->getRow($n, $arr); 121 } else { 122 $result = $this->conn->getRow($n); 123 } 124 if ($this->conn->isError($result)){ 125 $this->send_err_mail ($result ,$n); 107 $this->send_err_mail($result ,$n); 108 } 109 $this->result = $result; 110 111 return $this->result; 112 } 113 114 /** 115 * クエリを実行し、最初の行を返す 116 * 117 * @param string $sql SQL クエリ 118 * @param array $arrVal プリペアドステートメントの実行時に使用される配列。配列の要素数は、クエリ内のプレースホルダの数と同じでなければなりません。 119 * @param integer $fetchmode 使用するフェッチモード。デフォルトは DB_FETCHMODE_ASSOC。 120 * @return array データを含む1次元配列。失敗した場合に DB_Error オブジェクトを返します。 121 */ 122 function getRow($sql, $arrVal = array(), $fetchmode = DB_FETCHMODE_ASSOC) { 123 124 // mysqlの場合にはビュー表を変換する 125 if (DB_TYPE == "mysql") $sql = $this->dbFactory->sfChangeMySQL($sql); 126 127 $result = $this->conn->getRow($sql, $arrVal ,$fetchmode); 128 129 if ($this->conn->isError($result)){ 130 $this->send_err_mail($result ,$sql); 126 131 } 127 132 $this->result = $result; … … 168 173 169 174 if ($this->conn->isError($result)){ 170 $this->send_err_mail 175 $this->send_err_mail($result, $n); 171 176 } 172 177 $this->result = $result; … … 184 189 185 190 if ($this->conn->isError($result)){ 186 $this->send_err_mail 191 $this->send_err_mail($result, $n); 187 192 } 188 193 $this->result = $result;
Note: See TracChangeset
for help on using the changeset viewer.