Changeset 15361 for branches/feature-module-update/data/class
- Timestamp:
- 2007/08/27 10:29:27 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update/data/class/db/dbfactory/SC_DB_DBFactory_MYSQL.php
r15272 r15361 18 18 * @package DB 19 19 * @author LOCKON CO.,LTD. 20 * @version $Id $20 * @version $Id:SC_DB_DBFactory_MYSQL.php 15267 2007-08-09 12:31:52Z nanasess $ 21 21 */ 22 22 class SC_DB_DBFactory_MYSQL extends SC_DB_DBFactory { … … 105 105 106 106 /** 107 * View の WHERE 句を置換する. 108 * 109 * @param string $target 置換対象の文字列 110 * @param string $where 置換する文字列 111 * @param array $arrval WHERE 句の要素の配列 112 * @param string $option SQL 文の追加文字列 113 * @return string 置換後の SQL 文 114 */ 115 function sfViewWhere($target, $where = "", $arrval = array(), $option = ""){ 116 117 $arrWhere = split("[?]", $where); 118 $where_tmp = " WHERE " . $arrWhere[0]; 119 for($i = 1; $i < count($arrWhere); $i++){ 120 $where_tmp .= SC_Utils_Ex::sfQuoteSmart($arrval[$i - 1]) . $arrWhere[$i]; 121 } 122 $arrWhere = $this->getWhereConverter(); 123 $arrWhere[$target] = $where_tmp . " " . $option; 124 return $arrWhere[$target]; 125 } 126 127 /** 107 128 * SQL の中の View の存在をチェックする. 108 129 * … … 167 188 $changesql = eregi_replace("( RANDOM)", " RAND", $sql); 168 189 return $changesql; 169 }170 171 /**172 * View の WHERE 句を置換する.173 *174 * @access private175 * @param string $target 置換対象の文字列176 * @param string $where 置換する文字列177 * @param array $arrval WHERE 句の要素の配列178 * @param string $option SQL 文の追加文字列179 * @return string 置換後の SQL 文180 */181 function sfViewWhere($target, $where = "", $arrval = array(), $option = ""){182 global $arrViewWhere;183 $arrWhere = split("[?]", $where);184 $where_tmp = " WHERE " . $arrWhere[0];185 for($i = 1; $i < count($arrWhere); $i++){186 $where_tmp .= SC_Utils_Ex::sfQuoteSmart($arrval[$i - 1]) . $arrWhere[$i];187 }188 $arrViewWhere[$target] = $where_tmp . " " . $option;189 190 } 190 191
Note: See TracChangeset
for help on using the changeset viewer.