当前位置: 首页>>代码示例>>PHP>>正文


PHP string::replaceSql方法代码示例

本文整理汇总了PHP中string::replaceSql方法的典型用法代码示例。如果您正苦于以下问题:PHP string::replaceSql方法的具体用法?PHP string::replaceSql怎么用?PHP string::replaceSql使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在string的用法示例。


在下文中一共展示了string::replaceSql方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: existsMacAddr

 function existsMacAddr($mac_addr, $app_id = "")
 {
     $mac_addr = $this->getFlatMacAddr($mac_addr);
     $args = array();
     $args[0] = $mac_addr;
     $args['COND'] = "";
     if ($app_id != "") {
         $args['COND'] = " AND app_id != " . string::replaceSql($app_id);
     }
     // 実データでチェック
     $args['TYPE'] = "tbl";
     $sql = $this->getQuery('EXISTS_MAC_ADDR', $args);
     $id = $this->oDb->getOne($sql);
     if ($id != "") {
         return true;
     }
     // 申請データでチェック
     $args['TYPE'] = "entry";
     $args['COND'] = " AND entry_status = '0'";
     $sql = $this->getQuery('EXISTS_MAC_ADDR', $args);
     $id = $this->oDb->getOne($sql);
     if ($id != "") {
         return true;
     }
     return false;
 }
开发者ID:honda-kyoto,项目名称:UMS-Kyoto,代码行数:26,代码来源:apps_regist_common_mgr.class.php

示例2: getTargetList

 function getTargetList()
 {
     $args = array();
     if ($this->hasAdminActType('data_export.php')) {
         $args['COND'] = "";
     } else {
         $user_id = $this->getSessionData('LOGIN_USER_ID');
         $args['COND'] = "WHERE EXISTS (SELECT * FROM user_role_tbl WHERE user_role_mst.user_role_id = role_id AND del_flg = '0' AND user_id = " . string::replaceSql($user_id) . ")";
     }
     $sql = $this->getQuery('GET_TARGET_LIST', $args);
     $aryRet = $this->oDb->getAssoc2Ary($sql);
     return $aryRet;
 }
开发者ID:honda-kyoto,项目名称:UMS-Kyoto,代码行数:13,代码来源:data_export_mgr.class.php

示例3: existsGroupCode

 function existsGroupCode($group_code, $vpn_id = "")
 {
     $args = array();
     $args[0] = $group_code;
     $args['COND'] = "";
     if ($vpn_id != "") {
         $args['COND'] = " AND vpn_id != " . string::replaceSql($vpn_id);
     }
     $sql = $this->getQuery('EXISTS_GROUP_CODE', $args);
     $id = $this->oDb->getOne($sql);
     if ($id != "") {
         return true;
     }
     return false;
 }
开发者ID:honda-kyoto,项目名称:UMS-Kyoto,代码行数:15,代码来源:vpns_regist_common_mgr.class.php

示例4: outputData

 function outputData($start_date, $end_date)
 {
     $args = array();
     $args['COND'] = "";
     $aryCond = array();
     if ($start_date != "") {
         $aryCond[] = "UST.make_time::DATE >= TO_DATE('" . string::replaceSql($start_date) . "', 'YYYY/MM/DD') ";
     }
     if ($end_date != "") {
         $aryCond[] = "UST.make_time::DATE <= TO_DATE('" . string::replaceSql($end_date) . "', 'YYYY/MM/DD') ";
     }
     if (count($aryCond) > 0) {
         $args['COND'] = " WHERE " . join(" AND ", $aryCond);
     }
     $sql = $this->getQuery('GET_SALARY_OUTPUT_DATA', $args);
     $aryRet = $this->oDb->getAll($sql);
     $strUser = "";
     if (is_array($aryRet) && count($aryRet) > 0) {
         foreach ($aryRet as $data) {
             // 給与番号(職員IDの先頭1ケタ無し)
             $strUser .= '"' . $data['salary_no'] . '"';
             // 基本情報	氏名 
             $strUser .= ',"' . $data['kanjisei'] . " " . $data['kanjimei'] . '"';
             // 所属名(空白)
             $strUser .= ',""';
             // 統合ID
             $strUser .= ',"' . $data['login_id'] . '"';
             // 給与明細パスワード
             $strUser .= ',"' . $this->passwordDecrypt($data['salary_passwd']) . '"';
             // 職員ID
             $strUser .= ',"' . $data['make_time'] . '"';
             $strUser .= "\r\n";
         }
     } else {
         echo "0|対象期間のデータは存在しません。";
         return;
     }
     $file = "給与明細データ" . microtime(true) . ".csv";
     $file_path = EXPTEMP_PATH . $file;
     $bytes = file_put_contents($file_path, $strUser);
     echo "1|" . $file;
 }
开发者ID:honda-kyoto,项目名称:UMS-Kyoto,代码行数:42,代码来源:salary_data_export_mgr.class.php

示例5: makeDeviceList

 function makeDeviceList($request)
 {
     // 条件からプリンタのリストを取得
     $aryCond = array();
     if (@$request['vlan_room_id'] != "") {
         $aryCond[] = "APP.vlan_room_id = " . string::replaceSql($request['vlan_room_id']);
     } else {
         if (@$request['vlan_floor_id'] != "") {
             $aryCond[] = "EXISTS (SELECT * FROM vlan_room_mst WHERE APP.vlan_room_id = vlan_room_id AND del_flg = '0' AND vlan_floor_id = " . string::replaceSql($request['vlan_floor_id']) . ")";
         } else {
             if (@$request['vlan_ridge_id'] != "") {
                 $aryCond[] = "EXISTS (SELECT * FROM vlan_room_mst AS VRM,vlan_floor_mst AS VFM WHERE APP.vlan_room_id = VRM.vlan_room_id AND VRM.vlan_floor_id = VFM.vlan_floor_id AND VRM.del_flg = '0' AND VFM.del_flg = '0' AND VFM.vlan_ridge_id = " . string::replaceSql($request['vlan_ridge_id']) . ")";
             }
         }
     }
     $args = array();
     $args['APP_TYPE_ID'] = "3";
     $args['COND'] = "";
     if (count($aryCond) > 0) {
         $args['COND'] = " AND " . join(" AND ", $aryCond);
     }
     $sql = $this->getQuery('GET_DEVICE_LIST', $args);
     $aryRet = $this->oDb->getAssoc($sql);
     // 選択済みを削除
     if (is_array($request['device_id'])) {
         foreach ($request['device_id'] as $device_id) {
             unset($aryRet[$device_id]);
         }
     }
     $ary = array();
     if (is_array($aryRet)) {
         foreach ($aryRet as $app_id => $aryData) {
             $room_name = $this->getVlanRoomName($aryData['vlan_room_id']);
             $ary[$app_id] = $aryData['app_name'] . "(" . $room_name . ")";
         }
     }
     $options = $this->makeSelectOptionsTooltip($ary, $driver_name);
     return $options;
 }
开发者ID:honda-kyoto,项目名称:UMS-Kyoto,代码行数:39,代码来源:user_printer_add_mgr.class.php

示例6: makePrinterList

 function makePrinterList($request)
 {
     // 条件からプリンタのリストを取得
     $aryCond = array();
     if (@$request['vlan_room_id'] != "") {
         $aryCond[] = "APP.vlan_room_id = " . string::replaceSql($request['vlan_room_id']);
     } else {
         if (@$request['vlan_floor_id'] != "") {
             $aryCond[] = "EXISTS (SELECT * FROM vlan_room_mst WHERE APP.vlan_room_id = vlan_room_id AND del_flg = '0' AND vlan_floor_id = " . string::replaceSql($request['vlan_floor_id']) . ")";
         } else {
             if (@$request['vlan_ridge_id'] != "") {
                 $aryCond[] = "EXISTS (SELECT * FROM vlan_room_mst AS VRM,vlan_floor_mst AS VFM WHERE APP.vlan_room_id = VRM.vlan_room_id AND VRM.vlan_floor_id = VFM.vlan_floor_id AND VRM.del_flg = '0' AND VFM.del_flg = '0' AND VFM.vlan_ridge_id = " . string::replaceSql($request['vlan_ridge_id']) . ")";
             }
         }
     }
     if ($request['unallocated_only'] == "1") {
         $aryCond[] = "NOT EXISTS (SELECT * FROM sbc_device_drivername WHERE APP.app_id = app_id)";
     }
     $args = array();
     $args['APP_TYPE_ID'] = "3";
     $args['COND'] = "";
     if (count($aryCond) > 0) {
         $args['COND'] = " AND " . join(" AND ", $aryCond);
     }
     $sql = $this->getQuery('GET_PRINTER_LIST', $args);
     $aryRet = $this->oDb->getAssoc($sql);
     $ary = array();
     if (is_array($aryRet)) {
         foreach ($aryRet as $app_id => $aryData) {
             $room_name = $this->getVlanRoomName($aryData['vlan_room_id']);
             $ary[$app_id] = $aryData['app_name'] . "(" . $room_name . ")";
         }
     }
     $options = $this->makeSelectOptions($ary, @$request['app_id']);
     return $options;
 }
开发者ID:honda-kyoto,项目名称:UMS-Kyoto,代码行数:36,代码来源:printer_driver_add_mgr.class.php

示例7: getSearchArgs

 function getSearchArgs($request)
 {
     $args = $this->getSqlArgs();
     $args['COND'] = "";
     $aryCond = array();
     // キー番号
     if (@$request['card_id'] != "") {
         $aryCond[] = "card_6 LIKE '%" . string::replaceSql($request['card_id']) . "%'";
     }
     // 氏名
     if (@$request['card_name'] != "") {
         $aryCond[] = "card_8 LIKE '%" . string::replaceSql($request['card_name']) . "%'";
     }
     // カナ
     if (@$request['card_name_kana'] != "") {
         $aryCond[] = "card_9 LIKE '%" . string::replaceSql($request['card_name_kana']) . "%'";
     }
     if (count($aryCond) > 0) {
         $args['COND'] = " WHERE " . join(" AND ", $aryCond);
     }
     return $args;
 }
开发者ID:honda-kyoto,项目名称:UMS-Kyoto,代码行数:22,代码来源:card_search_mgr.class.php

示例8: getQuery

 function getQuery($id, $args = "")
 {
     global $cmnSql;
     $strSql = "";
     if (array_key_exists($id, $cmnSql)) {
         $strSql = $cmnSql[$id];
         if (is_array($args)) {
             foreach ($args as $key => $val) {
                 if (ereg("^[0-9]+\$", $key)) {
                     $val = string::replaceSql($val);
                 }
                 $repStr = "{" . $key . "}";
                 $strSql = str_replace($repStr, $val, $strSql);
             }
         } else {
             $strSql = str_replace("{0}", string::replaceSql($args), $strSql);
         }
     }
     return $strSql;
 }
开发者ID:honda-kyoto,项目名称:UMS-Kyoto,代码行数:20,代码来源:base.class.php

示例9: getSearchArgs

 function getSearchArgs($request)
 {
     $args = $this->getSqlArgs();
     $args['COND'] = "";
     $aryCond = array();
     // 統合ID
     if (@$request['login_id'] != "") {
         $aryCond[] = "UM.login_id LIKE '%" . string::replaceSql($request['login_id']) . "%'";
     }
     // カードNo.
     if (@$request['staffcode'] != "") {
         $aryCond[] = "EXISTS (SELECT * FROM kyoto_user_card_tbl WHERE UM.user_id = user_id AND del_flg = '0' AND key_number LIKE '%" . string::replaceSql($request['staffcode']) . "%')";
     }
     // カナ氏名
     if (@$request['kananame'] != "") {
         $kananame = string::han2zen($request['kananame']);
         $kananame = str_replace(" ", " ", $kananame);
         $kananame = str_replace(" ", "", $kananame);
         $strBuff = "(";
         $strBuff .= "COALESCE(UM.kanasei, ' ') || COALESCE(UM.kanamei, ' ') LIKE '%" . string::replaceSql($request['kananame']) . "%'";
         $strBuff .= " OR ";
         $strBuff .= "COALESCE(UM.kanjisei, ' ') || COALESCE(UM.kanjimei, ' ') LIKE '%" . string::replaceSql($request['kananame']) . "%'";
         $strBuff .= " OR ";
         $strBuff .= "UM.kanasei || UM.kanamei LIKE '%" . string::replaceSql($kananame) . "%'";
         $strBuff .= " OR ";
         $strBuff .= "UM.kanjisei || UM.kanjimei LIKE '%" . string::replaceSql($kananame) . "%'";
         $strBuff .= " OR ";
         $strBuff .= "EXISTS (SELECT * FROM user_his_tbl WHERE UM.user_id = user_id AND del_flg = '0' AND replace(replace(kananame, ' ', ' '), ' ', '') LIKE '%" . string::replaceSql($kananame) . "%')";
         $strBuff .= " OR ";
         $strBuff .= "EXISTS (SELECT * FROM user_his_tbl WHERE UM.user_id = user_id AND del_flg = '0' AND replace(replace(kanjiname, ' ', ' '), ' ', '') LIKE '%" . string::replaceSql($kananame) . "%')";
         $strBuff .= ")";
         $aryCond[] = $strBuff;
     }
     // 職種
     if (@$request['job_id'] != "") {
         $strBuff = "(";
         $strBuff .= "UM.job_id = " . string::replaceSql($request['job_id']);
         $strBuff .= " OR ";
         $strBuff .= "EXISTS (SELECT * FROM user_sub_job_tbl WHERE UM.user_id = user_id AND del_flg = '0' AND job_id = " . string::replaceSql($request['job_id']) . ")";
         $strBuff .= ")";
         $aryCond[] = $strBuff;
     }
     // 役職
     if (@$request['post_id'] != "") {
         $strBuff = "(";
         $strBuff .= "UM.post_id = " . string::replaceSql($request['post_id']);
         $strBuff .= " OR ";
         $strBuff .= "EXISTS (SELECT * FROM user_sub_post_tbl WHERE UM.user_id = user_id AND del_flg = '0' AND post_id = " . string::replaceSql($request['post_id']) . ")";
         $strBuff .= ")";
         $aryCond[] = $strBuff;
     }
     // 常勤/非常勤
     if (@$request['joukin_kbn'] != "") {
         $aryCond[] = "UM.joukin_kbn = '" . string::replaceSql($request['joukin_kbn']) . "'";
     }
     // 所属
     if (@$request['belong_chg_id'] != "") {
         $strBuff = "(";
         $strBuff .= "UM.belong_chg_id = " . string::replaceSql($request['belong_chg_id']);
         $strBuff .= " OR ";
         $strBuff .= "EXISTS (SELECT * FROM user_sub_chg_tbl WHERE UM.user_id = user_id AND del_flg = '0' AND belong_chg_id = " . string::replaceSql($request['belong_chg_id']) . ")";
         $strBuff .= ")";
         $aryCond[] = $strBuff;
     } else {
         if (@$request['belong_sec_id'] != "") {
             $strBuff = "(";
             $strBuff .= "EXISTS (SELECT * FROM belong_chg_mst WHERE UM.belong_chg_id = belong_chg_id AND del_flg = '0' AND belong_sec_id = " . string::replaceSql($request['belong_sec_id']) . ")";
             $strBuff .= " OR ";
             $strBuff .= "EXISTS (SELECT * FROM user_sub_chg_tbl AS USC,belong_chg_mst AS BCM WHERE UM.user_id = USC.user_id AND USC.belong_chg_id = BCM.belong_chg_id AND BCM.del_flg = '0' AND BCM.belong_sec_id = " . string::replaceSql($request['belong_sec_id']) . ")";
             $strBuff .= ")";
             $aryCond[] = $strBuff;
         } else {
             if (@$request['belong_dep_id'] != "") {
                 $strBuff = "(";
                 $strBuff .= "EXISTS (SELECT * FROM belong_chg_mst AS BCM,belong_sec_mst AS BSM WHERE UM.belong_chg_id = BCM.belong_chg_id AND BCM.belong_sec_id = BSM.belong_sec_id AND BCM.del_flg = '0' AND BSM.del_flg = '0' AND BSM.belong_dep_id = " . string::replaceSql($request['belong_dep_id']) . ")";
                 $strBuff .= " OR ";
                 $strBuff .= "EXISTS (SELECT * FROM user_sub_chg_tbl AS USC,belong_chg_mst AS BCM,belong_sec_mst AS BSM WHERE UM.user_id = USC.user_id AND USC.belong_chg_id = BCM.belong_chg_id AND BCM.belong_sec_id = BSM.belong_sec_id AND BCM.del_flg = '0' AND BSM.del_flg = '0' AND BSM.belong_dep_id = " . string::replaceSql($request['belong_dep_id']) . ")";
                 $strBuff .= ")";
                 $aryCond[] = $strBuff;
             } else {
                 if (@$request['belong_div_id'] != "") {
                     $strBuff = "(";
                     $strBuff .= "EXISTS (SELECT * FROM belong_chg_mst AS BCM,belong_sec_mst AS BSM,belong_dep_mst AS BDM WHERE UM.belong_chg_id = BCM.belong_chg_id AND BCM.belong_sec_id = BSM.belong_sec_id AND BSM.belong_dep_id = BDM.belong_dep_id AND BCM.del_flg = '0' AND BSM.del_flg = '0' AND BDM.del_flg = '0' AND BDM.belong_div_id = " . string::replaceSql($request['belong_div_id']) . ")";
                     $strBuff .= " OR ";
                     $strBuff .= "EXISTS (SELECT * FROM user_sub_chg_tbl AS USC,belong_chg_mst AS BCM,belong_sec_mst AS BSM,belong_dep_mst AS BDM WHERE UM.user_id = USC.user_id AND USC.belong_chg_id = BCM.belong_chg_id AND BCM.belong_sec_id = BSM.belong_sec_id AND BSM.belong_dep_id = BDM.belong_dep_id AND BCM.del_flg = '0' AND BSM.del_flg = '0' AND BDM.del_flg = '0' AND BDM.belong_div_id = " . string::replaceSql($request['belong_div_id']) . ")";
                     $strBuff .= ")";
                     $aryCond[] = $strBuff;
                 } else {
                     if (@$request['belong_class_id'] != "") {
                         $strBuff = "(";
                         $strBuff .= "EXISTS (SELECT * FROM belong_chg_mst AS BCM,belong_sec_mst AS BSM,belong_dep_mst AS BDM,belong_div_mst AS BVM WHERE UM.belong_chg_id = BCM.belong_chg_id AND BCM.belong_sec_id = BSM.belong_sec_id AND BSM.belong_dep_id = BDM.belong_dep_id AND BDM.belong_div_id = BVM.belong_div_id AND BCM.del_flg = '0' AND BSM.del_flg = '0' AND BDM.del_flg = '0' AND BVM.del_flg = '0' AND BVM.belong_class_id = " . string::replaceSql($request['belong_class_id']) . ")";
                         $strBuff .= " OR ";
                         $strBuff .= "EXISTS (SELECT * FROM user_sub_chg_tbl AS USC,belong_chg_mst AS BCM,belong_sec_mst AS BSM,belong_dep_mst AS BDM,belong_div_mst AS BVM WHERE UM.user_id = USC.user_id AND USC.belong_chg_id = BCM.belong_chg_id AND BCM.belong_sec_id = BSM.belong_sec_id AND BSM.belong_dep_id = BDM.belong_dep_id AND BDM.belong_div_id = BVM.belong_div_id AND BCM.del_flg = '0' AND BSM.del_flg = '0' AND BDM.del_flg = '0' AND BVM.del_flg = '0' AND BVM.belong_class_id = " . string::replaceSql($request['belong_class_id']) . ")";
                         $strBuff .= ")";
                         $aryCond[] = $strBuff;
                     }
                 }
             }
         }
     }
//.........这里部分代码省略.........
开发者ID:honda-kyoto,项目名称:UMS-Kyoto,代码行数:101,代码来源:users_search_mgr.class_00.php

示例10: getSearchArgs

    function getSearchArgs($request)
    {
        $args = $this->getSqlArgs();
        $args['COND'] = "";
        $args['ENTRY_STATUS_ENTRY'] = $this->sqlItemChar(ENTRY_STATUS_ENTRY);
        $args['ENTRY_STATUS_REJECT'] = $this->sqlItemChar(ENTRY_STATUS_REJECT);
        $aryCond = array();
        // 名称
        if (@$request['mlist_name'] != "") {
            $aryCond[] = "MLT.mlist_name LIKE '%" . string::replaceSql($request['mlist_name']) . "%'";
        }
        // アカウント
        if (@$request['mlist_acc'] != "") {
            $aryCond[] = "MLT.mlist_acc LIKE '%" . string::replaceSql($request['mlist_acc']) . "%'";
        }
        // 種別
        if (@$request['mlist_kbn'] != "") {
            $aryCond[] = "MLT.mlist_kbn = '" . string::replaceSql($request['mlist_kbn']) . "'";
        }
        $cnt = 0;
        if (is_array($request['entry_kbn_status'])) {
            foreach ($request['entry_kbn_status'] as $key => $val) {
                if ($val != "1") {
                    continue;
                }
                if ($key == 'agreed') {
                    $aryKbnStat[] = "(MLT.entry_kbn IS NULL AND APP.entry_status IS NULL)";
                }
                list($entry_kbn, $entry_status) = explode("_", $key);
                $aryKbnStat[] = "(MLT.entry_kbn = '" . string::replaceSql($entry_kbn) . "' AND MLT.entry_status = '" . string::replaceSql($entry_status) . "')";
                $cnt++;
            }
        }
        if ($cnt > 0) {
            $aryCond[] = "(" . implode(" OR ", $aryKbnStat) . ")";
        }
        // ログインユーザの権限によって処理分け
        // 管理権限があるか?
        if (!$this->hasAdminActType('mlists_search.php')) {
            // 一般ユーザの場合自分の申請したもののみ表示
            $user_id = $this->getSessionData('LOGIN_USER_ID');
            $uid = string::replaceSql($user_id);
            $aryCond[] = <<<SQL
(
EXISTS (SELECT * FROM mlist_head_entry WHERE MLT.mlist_id = mlist_id AND entry_id = {$uid})
OR
EXISTS (SELECT * FROM mlist_admin_list WHERE MLT.mlist_id = mlist_id AND del_flg = '0' AND user_id = {$uid})
)

SQL;
        }
        if (count($aryCond) > 0) {
            $args['COND'] = " WHERE " . join(" AND ", $aryCond);
        }
        return $args;
    }
开发者ID:honda-kyoto,项目名称:UMS-Kyoto,代码行数:56,代码来源:mlists_search_mgr.class.php

示例11: getSearchArgs

 function getSearchArgs($request)
 {
     $args = $this->getSqlArgs();
     $args['COND'] = "";
     $aryCond = array();
     // 種別
     if (@$request['vpn_kbn'] != "") {
         $aryCond[] = "VHT.vpn_kbn = '" . string::replaceSql($request['vpn_kbn']) . "'";
     }
     // 名称
     if (@$request['vpn_name'] != "") {
         $aryCond[] = "VHT.vpn_name LIKE '%" . string::replaceSql($request['vpn_name']) . "%'";
     }
     // アカウント
     if (@$request['group_name'] != "") {
         $aryCond[] = "VHT.group_name LIKE '%" . string::replaceSql($request['group_name']) . "%'";
     }
     if ($this->isNormalUser()) {
         // 一般ユーザの場合
         $user_id = $this->getSessionData('LOGIN_USER_ID');
         $aryCond[] = "EXISTS (SELECT * FROM vpn_admin_list WHERE VHT.vpn_id = vpn_id AND user_id = " . string::replaceSql($user_id) . ")";
     }
     if (count($aryCond) > 0) {
         $args['COND'] = " AND " . join(" AND ", $aryCond);
     }
     return $args;
 }
开发者ID:honda-kyoto,项目名称:UMS-Kyoto,代码行数:27,代码来源:vpns_search_mgr.class.php

示例12: getSearchArgs

 function getSearchArgs($request)
 {
     $args = $this->getSqlArgs();
     $args['COND'] = "";
     $aryCond = array();
     // 更新日:自
     if (@$request['issue_from'] != "") {
         $aryCond[] = "KUC.update_time::date >= '" . string::replaceSql($request['issue_from']) . "'";
     }
     // 更新日:至
     if (@$request['issue_to'] != "") {
         $aryCond[] = "KUC.update_time::date <= '" . string::replaceSql($request['issue_to']) . "'";
     }
     // キー番号
     $request['key_number'] = string::zen2han($request['key_number']);
     if (@$request['key_number'] != "") {
         $aryCond[] = "KUC.key_number LIKE '%" . string::replaceSql($request['key_number']) . "%'";
     }
     // option
     if (@$request['search_option'] == "1") {
         $aryCond[] = "KUC.make_time = KUC.update_time";
     } else {
         if (@$request['search_option'] == "2") {
             $aryCond[] = "KUC.make_time != KUC.update_time";
         }
     }
     // type
     if (@$request['data_type'] == "1") {
         $aryCond[] = "KUC.list_no = 0";
     }
     if (count($aryCond) > 0) {
         $args['COND'] = " WHERE " . join(" AND ", $aryCond);
     }
     return $args;
 }
开发者ID:honda-kyoto,项目名称:UMS-Kyoto,代码行数:35,代码来源:user_card_issue_list_mgr.class.php

示例13: existsMlistName

 function existsMlistName($mlist_name, $mlist_id = "")
 {
     $args = array();
     $args[0] = $mlist_name;
     $args['COND'] = "";
     if ($mlist_id != "") {
         $args['COND'] = " AND mlist_id != " . string::replaceSql($mlist_id);
     }
     $sql = $this->getQuery('EXISTS_MLIST_NAME', $args);
     $id = $this->oDb->getOne($sql);
     if ($id != "") {
         return true;
     }
     return false;
 }
开发者ID:honda-kyoto,项目名称:UMS-Kyoto,代码行数:15,代码来源:mlists_regist_common_mgr.class.php

示例14: getSearchArgs

 function getSearchArgs($request)
 {
     $args = $this->getSqlArgs();
     $args['COND'] = "";
     $aryCond = array();
     // 名称
     if (@$request['guest_name'] != "") {
         $aryCond[] = "guest_name LIKE '%" . string::replaceSql($request['guest_name']) . "%'";
     }
     // アカウント
     if (@$request['company_name'] != "") {
         $aryCond[] = "company_name LIKE '%" . string::replaceSql($request['company_name']) . "%'";
     }
     // MACアドレス
     if (@$request['mac_addr'] != "") {
         $mac_addr = strtolower($request['mac_addr']);
         $mac_addr = str_replace(":", "", $mac_addr);
         $mac_addr = str_replace("-", "", $mac_addr);
         $aryCond[] = "mac_addr LIKE '%" . string::replaceSql($mac_addr) . "%'";
     }
     // 登録日
     if (@$request['entry_date'] != "") {
         $aryCond[] = "make_time::date = '" . string::replaceSql($request['entry_date']) . "'";
     }
     if (@$request['all_data_flg'] != '1') {
         $aryCond[] = "make_time >= current_timestamp + '-1 day'";
     }
     if ($this->isNormalUser()) {
         // 一般ユーザの場合
         $user_id = $this->getSessionData('LOGIN_USER_ID');
         $aryCond[] = "make_id = " . string::replaceSql($user_id);
     }
     if (count($aryCond) > 0) {
         $args['COND'] = " AND " . join(" AND ", $aryCond);
     }
     return $args;
 }
开发者ID:honda-kyoto,项目名称:UMS-Kyoto,代码行数:37,代码来源:guests_search_mgr.class.php

示例15: existsStaffcode

 function existsStaffcode($staffcode, $user_id = "")
 {
     $args = array();
     $args[0] = $staffcode;
     $args['COND'] = "";
     if ($user_id != "") {
         $args['COND'] = " AND user_id != " . string::replaceSql($user_id);
     }
     $sql = $this->getQuery('EXISTS_STAFFCODE', $args);
     $id = $this->oDb->getOne($sql);
     if ($id != "") {
         return true;
     }
     return false;
 }
开发者ID:honda-kyoto,项目名称:UMS-Kyoto,代码行数:15,代码来源:users_regist_common_mgr.class.php


注:本文中的string::replaceSql方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。