Changeset 21376 for branches/version-2_11-dev/data/class/SC_Query.php
- Timestamp:
- 2011/12/26 17:11:08 (14 years ago)
- File:
-
- 1 edited
-
branches/version-2_11-dev/data/class/SC_Query.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_11-dev/data/class/SC_Query.php
r21375 r21376 131 131 132 132 /** 133 * EXISTS文を実行する. 134 * 135 * @param string $table テーブル名 136 * @param string $where where句 137 * @param array $arrWhereVal プレースホルダ 138 * @return boolean 有無 139 */ 140 function exists($table, $where = '', $arrWhereVal = array()) { 141 $sql_inner = $this->getSql('*', $table, $where, $arrWhereVal); 142 $sql = "SELECT CASE WHEN EXISTS($sql_inner) THEN 1 ELSE 0 END"; 143 $res = $this->getOne($sql, $arrWhereVal); 144 return (bool)$res; 145 } 146 147 /** 133 148 * SELECT文を実行する. 134 149 *
Note: See TracChangeset
for help on using the changeset viewer.
