Changeset 18758 for trunk/data/class/SC_Query.php
- Timestamp:
- 2010/07/20 13:25:33 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/data/class/SC_Query.php
r18562 r18758 3 3 * This file is part of EC-CUBE 4 4 * 5 * Copyright(c) 2000-20 07LOCKON CO.,LTD. All Rights Reserved.5 * Copyright(c) 2000-2010 LOCKON CO.,LTD. All Rights Reserved. 6 6 * 7 7 * http://www.lockon.co.jp/ … … 89 89 */ 90 90 function select($col, $table, $where = "", $arrval = array()){ 91 $sqlse = $this->get sql($col, $table, $where);91 $sqlse = $this->getSql($col, $table, $where); 92 92 // DBに依存した SQL へ変換 93 93 $dbFactory = SC_DB_DBFactory_Ex::getInstance(); … … 153 153 } 154 154 155 function get all($sql, $arrval = array()) {155 function getAll($sql, $arrval = array()) { 156 156 $ret = $this->conn->getAll($sql, $arrval); 157 157 return $ret; 158 158 } 159 159 160 function get sql($col, $table, $where) {160 function getSql($col, $table, $where) { 161 161 if($where != "") { 162 162 // 引数の$whereを優先して実行する。 … … 172 172 } 173 173 174 function set option($str) {174 function setOption($str) { 175 175 $this->option = $str; 176 176 } 177 177 178 function set limitoffset($limit, $offset = 0, $return = false) {178 function setLimitOffset($limit, $offset = 0, $return = false) { 179 179 if (is_numeric($limit) && is_numeric($offset)){ 180 180 … … 190 190 } 191 191 192 function set groupby($str) {192 function setGroupBy($str) { 193 193 $this->groupby = "GROUP BY " . $str; 194 194 } … … 202 202 } 203 203 204 function or where($str) {204 function orWhere($str) { 205 205 if($this->where != "") { 206 206 $this->where .= " OR " . $str; … … 210 210 } 211 211 212 function set where($str) {212 function setWhere($str) { 213 213 $this->where = $str; 214 214 } 215 215 216 function set order($str) {216 function setOrder($str) { 217 217 $this->order = "ORDER BY " . $str; 218 218 } 219 219 220 220 221 function set limit($limit){221 function setLimit($limit){ 222 222 if ( is_numeric($limit)){ 223 223 $this->option = " LIMIT " .$limit; … … 225 225 } 226 226 227 function set offset($offset) {227 function setOffset($offset) { 228 228 if ( is_numeric($offset)){ 229 229 $this->offset = " OFFSET " .$offset; … … 404 404 } 405 405 406 function get one($sql, $arrval = array()) {406 function getOne($sql, $arrval = array()) { 407 407 // SQL文の実行 408 408 $ret = $this->conn->getOne($sql, $arrval); … … 412 412 413 413 // 一行を取得 414 function get row($table, $col, $where = "", $arrval = array()) {414 function getRow($table, $col, $where = "", $arrval = array()) { 415 415 if(strlen($where) <= 0) { 416 416 $sqlse = "SELECT $col FROM $table";
Note: See TracChangeset
for help on using the changeset viewer.