Index: branches/version-2_11-dev/data/class/pages/mypage/LC_Page_Mypage_Favorite.php
===================================================================
--- branches/version-2_11-dev/data/class/pages/mypage/LC_Page_Mypage_Favorite.php	(revision 21376)
+++ branches/version-2_11-dev/data/class/pages/mypage/LC_Page_Mypage_Favorite.php	(revision 21402)
@@ -177,10 +177,11 @@
     // お気に入り商品削除
     function lfDeleteFavoriteProduct($customer_id, $product_id) {
-        $objQuery =& SC_Query_Ex::getSingletonInstance();
+        $objQuery       =& SC_Query_Ex::getSingletonInstance();
+        $count      = $objQuery->count("dtb_customer_favorite_products", "customer_id = ? AND product_id = ?", array($customer_id, $product_id));
 
-        $exists = $objQuery->exists("dtb_customer_favorite_products", "customer_id = ? AND product_id = ?", array($customer_id, $product_id));
-
-        if ($exists) {
+        if ($count > 0) {
+            $objQuery->begin();
             $objQuery->delete('dtb_customer_favorite_products', "customer_id = ? AND product_id = ?", array($customer_id, $product_id));
+            $objQuery->commit();
         }
     }
Index: branches/version-2_11-dev/data/class/pages/upgrade/LC_Page_Upgrade_Download.php
===================================================================
--- branches/version-2_11-dev/data/class/pages/upgrade/LC_Page_Upgrade_Download.php	(revision 21376)
+++ branches/version-2_11-dev/data/class/pages/upgrade/LC_Page_Upgrade_Download.php	(revision 21402)
@@ -268,6 +268,6 @@
         $objQuery = new SC_Query_Ex();
 
-        $exists = $objQuery->exists($table, $where, array($objRet->product_id));
-        if ($exists) {
+        $count = $objQuery->count($table, $where, array($objRet->product_id));
+        if ($count) {
             $arrUpdate = array(
                 'module_code' => $objRet->product_code,
Index: branches/version-2_11-dev/data/class/pages/shopping/LC_Page_Shopping.php
===================================================================
--- branches/version-2_11-dev/data/class/pages/shopping/LC_Page_Shopping.php	(revision 21376)
+++ branches/version-2_11-dev/data/class/pages/shopping/LC_Page_Shopping.php	(revision 21402)
@@ -537,6 +537,6 @@
         $objQuery =& SC_Query_Ex::getSingletonInstance();
         $where = "email = ? AND status = 1 AND del_flg = 0";
-        $exists = $objQuery->exists("dtb_customer", $where, array($login_email));
-        return $exists;
+        $count = $objQuery->count("dtb_customer", $where, array($login_email));
+        return $count > 0;
     }
 
Index: branches/version-2_11-dev/data/class/pages/admin/system/LC_Page_Admin_System_Editdb.php
===================================================================
--- branches/version-2_11-dev/data/class/pages/admin/system/LC_Page_Admin_System_Editdb.php	(revision 21376)
+++ branches/version-2_11-dev/data/class/pages/admin/system/LC_Page_Admin_System_Editdb.php	(revision 21402)
@@ -170,5 +170,5 @@
             if($param['indexflag'] != $param['indexflag_new']) {
                 // 入力値がデータにある対象テーブルかのチェック
-                if ($objQuery->exists('dtb_index_list', 'table_name = ? and column_name = ?', array($param['table_name'], $param['column_name']))) {
+                if($objQuery->count('dtb_index_list', 'table_name = ? and column_name = ?', array($param['table_name'], $param['column_name']))) {
                     $arrTarget[] = $param;
                 }
Index: branches/version-2_11-dev/data/class/pages/admin/system/LC_Page_Admin_System_Input.php
===================================================================
--- branches/version-2_11-dev/data/class/pages/admin/system/LC_Page_Admin_System_Input.php	(revision 21376)
+++ branches/version-2_11-dev/data/class/pages/admin/system/LC_Page_Admin_System_Input.php	(revision 21402)
@@ -279,10 +279,11 @@
      */
     function memberDataExists($where, $val) {
+        $table = 'dtb_member';
+
         $objQuery =& SC_Query_Ex::getSingletonInstance();
-
-        $table = 'dtb_member';
-
-        $exists = $objQuery->exists($table, $where, array($val));
-        return $exists;
+        $count = $objQuery->count($table, $where, array($val));
+
+        if ($count > 0) return true;
+        return false;
     }
 
Index: branches/version-2_11-dev/data/class/pages/admin/design/LC_Page_Admin_Design.php
===================================================================
--- branches/version-2_11-dev/data/class/pages/admin/design/LC_Page_Admin_Design.php	(revision 21376)
+++ branches/version-2_11-dev/data/class/pages/admin/design/LC_Page_Admin_Design.php	(revision 21402)
@@ -274,7 +274,7 @@
             $arrParams['anywhere'] = intval($objFormParam->getValue('anywhere_' . $i));
             if ($arrParams['anywhere'] == 1) {
-                $exists = $objQuery->exists('dtb_blocposition', 'anywhere = 1 AND bloc_id = ? AND device_type_id = ?',
+                $count = $objQuery->count('dtb_blocposition', 'anywhere = 1 AND bloc_id = ? AND device_type_id = ?',
                                           array($id, $device_type_id));
-                if ($exists) {
+                if ($count > 0) {
                     continue;
                 }
Index: branches/version-2_11-dev/data/class/pages/admin/design/LC_Page_Admin_Design_MainEdit.php
===================================================================
--- branches/version-2_11-dev/data/class/pages/admin/design/LC_Page_Admin_Design_MainEdit.php	(revision 21376)
+++ branches/version-2_11-dev/data/class/pages/admin/design/LC_Page_Admin_Design_MainEdit.php	(revision 21402)
@@ -325,6 +325,6 @@
 
         $objQuery =& SC_Query_Ex::getSingletonInstance();
-        $exists = $objQuery->exists('dtb_pagelayout', $where, $arrValues);
-        if ($exists) {
+        $count = $objQuery->count('dtb_pagelayout', $where, $arrValues);
+        if ($count > 0) {
             $objErr->arrErr['filename'] = '※ 同じURLのデータが存在しています。別のURLを入力してください。<br />';
         }
Index: branches/version-2_11-dev/data/class/pages/admin/design/LC_Page_Admin_Design_UpDown.php
===================================================================
--- branches/version-2_11-dev/data/class/pages/admin/design/LC_Page_Admin_Design_UpDown.php	(revision 21376)
+++ branches/version-2_11-dev/data/class/pages/admin/design/LC_Page_Admin_Design_UpDown.php	(revision 21402)
@@ -166,6 +166,6 @@
         // DBにすでに登録されていないかチェック
         $objQuery =& SC_Query_Ex::getSingletonInstance();
-        $exists = $objQuery->exists("dtb_templates", "template_code = ?", array($template_code));
-        if ($exists) {
+        $count = $objQuery->count("dtb_templates", "template_code = ?", array($template_code));
+        if ($count > 0) {
             $arrErr['template_code'] = "※ すでに登録されているテンプレートコードです。<br/>";
         }
Index: branches/version-2_11-dev/data/class/pages/admin/ownersstore/LC_Page_Admin_OwnersStore_Settings.php
===================================================================
--- branches/version-2_11-dev/data/class/pages/admin/ownersstore/LC_Page_Admin_OwnersStore_Settings.php	(revision 21376)
+++ branches/version-2_11-dev/data/class/pages/admin/ownersstore/LC_Page_Admin_OwnersStore_Settings.php	(revision 21402)
@@ -177,7 +177,7 @@
         $table = 'dtb_ownersstore_settings';
         $objQuery = new SC_Query_Ex();
-        $exists = $objQuery->exists($table);
-
-        if ($exists) {
+        $count = $objQuery->count($table);
+
+        if ($count) {
             $objQuery->update($table, $arrSettingsData);
         } else {
Index: branches/version-2_11-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis.php
===================================================================
--- branches/version-2_11-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis.php	(revision 21376)
+++ branches/version-2_11-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis.php	(revision 21402)
@@ -82,5 +82,6 @@
         $objDb = new SC_Helper_DB_Ex();
 
-        if ($objDb->sfGetBasisExists()) {
+        $cnt = $objDb->sfGetBasisCount();
+        if ($cnt > 0) {
             $this->tpl_mode = 'update';
         } else {
Index: branches/version-2_11-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Tradelaw.php
===================================================================
--- branches/version-2_11-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Tradelaw.php	(revision 21376)
+++ branches/version-2_11-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Tradelaw.php	(revision 21402)
@@ -76,5 +76,6 @@
         $objFormParam->setParam($_POST);
 
-        if ($objDb->sfGetBasisExists()) {
+        $cnt = $objDb->sfGetBasisCount();
+        if ($cnt > 0) {
             $this->tpl_mode = 'update';
         } else {
Index: branches/version-2_11-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Point.php
===================================================================
--- branches/version-2_11-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Point.php	(revision 21376)
+++ branches/version-2_11-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Point.php	(revision 21402)
@@ -76,5 +76,6 @@
         $objFormParam->setParam($_POST);
 
-        if ($objDb->sfGetBasisExists()) {
+        $cnt = $objDb->sfGetBasisCount();
+        if ($cnt > 0) {
             $this->tpl_mode = 'update';
         } else {
Index: branches/version-2_11-dev/data/class/pages/admin/products/LC_Page_Admin_Products_Category.php
===================================================================
--- branches/version-2_11-dev/data/class/pages/admin/products/LC_Page_Admin_Products_Category.php	(revision 21376)
+++ branches/version-2_11-dev/data/class/pages/admin/products/LC_Page_Admin_Products_Category.php	(revision 21402)
@@ -205,6 +205,6 @@
         // 子カテゴリのチェック
         $where = "parent_category_id = ? AND del_flg = 0";
-        $exists = $objQuery->exists("dtb_category", $where, array($category_id));
-        if ($exists) {
+        $count = $objQuery->count("dtb_category", $where, array($category_id));
+        if ($count > 0) {
              $this->arrErr['category_name'] = "※ 子カテゴリが存在するため削除できません。<br/>";
              return;
@@ -213,6 +213,6 @@
         $table = "dtb_product_categories AS T1 LEFT JOIN dtb_products AS T2 ON T1.product_id = T2.product_id";
         $where = "T1.category_id = ? AND T2.del_flg = 0";
-        $exists = $objQuery->exists($table, $where, array($category_id));
-        if ($exists) {
+        $count = $objQuery->count($table, $where, array($category_id));
+        if ($count > 0) {
             $this->arrErr['category_name'] = "※ カテゴリ内に商品が存在するため削除できません。<br/>";
             return;
@@ -331,6 +331,6 @@
             $arrWhereVal[] = $category_id;
         }
-        $exists = $objQuery->exists('dtb_category', $where, $arrWhereVal);
-        if ($exists) {
+        $count = $objQuery->count('dtb_category', $where, $arrWhereVal);
+        if ($count > 0) {
             $arrErr['category_name'] = "※ 既に同じ内容の登録が存在します。<br/>";
             return $arrErr;
Index: branches/version-2_11-dev/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSVCategory.php
===================================================================
--- branches/version-2_11-dev/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSVCategory.php	(revision 21376)
+++ branches/version-2_11-dev/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSVCategory.php	(revision 21402)
@@ -374,10 +374,10 @@
             // 同じidが存在すればupdate存在しなければinsert
             $where = "category_id = ?";
-            $category_exists = $objQuery->exists("dtb_category", $where, array($sqlval['category_id']));
-            if ($category_exists) {
+            $category_count = $objQuery->count("dtb_category", $where, array($sqlval['category_id']));
+            if($category_count > 0){
                 // UPDATEの実行
                 $where = "category_id = ?";
                 $objQuery->update("dtb_category", $sqlval, $where, array($sqlval['category_id']));
-            } else {
+            }else{
                 $sqlval['create_date'] = $arrList['update_date'];
                 // 新規登録
@@ -477,10 +477,10 @@
             }
             $where = "parent_category_id = ? AND category_id <> ? AND category_name = ?";
-            $exists = $objQuery->exists('dtb_category',
+            $count = $objQuery->count('dtb_category',
                         $where,
                         array($parent_category_id,
                                 $item['category_id'],
                                 $item['category_name']));
-            if ($exists) {
+            if($count > 0) {
                 $arrErr['category_name'] = "※ 既に同名のカテゴリが存在します。";
             }
Index: branches/version-2_11-dev/data/class/pages/admin/products/LC_Page_Admin_Products_Product.php
===================================================================
--- branches/version-2_11-dev/data/class/pages/admin/products/LC_Page_Admin_Products_Product.php	(revision 21376)
+++ branches/version-2_11-dev/data/class/pages/admin/products/LC_Page_Admin_Products_Product.php	(revision 21402)
@@ -800,6 +800,7 @@
 
         $objQuery = new SC_Query_Ex();
-        $exists = $objQuery->exists('dtb_products', $where, $sqlval);
-        return $exists;
+        $count = $objQuery->count('dtb_products', $where, $sqlval);
+        if (!$count) return false;
+        return true;
     }
 
Index: branches/version-2_11-dev/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSV.php
===================================================================
--- branches/version-2_11-dev/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSV.php	(revision 21376)
+++ branches/version-2_11-dev/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSV.php	(revision 21402)
@@ -391,8 +391,8 @@
             // 同じidが存在すればupdate存在しなければinsert
             $where = "product_id = ?";
-            $product_exists = $objQuery->exists("dtb_products", $where, array($sqlval['product_id']));
-            if ($product_exists) {
+            $product_count = $objQuery->count("dtb_products", $where, array($sqlval['product_id']));
+            if($product_count > 0){
                 $objQuery->update("dtb_products", $sqlval, $where, array($sqlval['product_id']));
-            } else {
+            }else{
                 $sqlval['create_date'] = $arrList['update_date'];
                 // INSERTの実行
Index: branches/version-2_11-dev/data/class/pages/frontparts/LC_Page_FrontParts_LoginCheck.php
===================================================================
--- branches/version-2_11-dev/data/class/pages/frontparts/LC_Page_FrontParts_LoginCheck.php	(revision 21376)
+++ branches/version-2_11-dev/data/class/pages/frontparts/LC_Page_FrontParts_LoginCheck.php	(revision 21402)
@@ -157,7 +157,7 @@
                     $objQuery = SC_Query_Ex::getSingletonInstance();
                     $where = '(email = ? OR email_mobile = ?) AND status = 1 AND del_flg = 0';
-                    $exists = $objQuery->exists("dtb_customer", $where, array($arrForm['login_email'], $arrForm['login_email']));
+                    $ret = $objQuery->count("dtb_customer", $where, array($arrForm['login_email'], $arrForm['login_email']));
                     // ログインエラー表示 TODO リファクタリング
-                    if ($exists) {
+                    if($ret > 0) {
                         if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_SMARTPHONE) {
                             echo $this->lfGetErrorMessage(TEMP_LOGIN_ERROR);
Index: branches/version-2_11-dev/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_News.php
===================================================================
--- branches/version-2_11-dev/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_News.php	(revision 21374)
+++ branches/version-2_11-dev/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_News.php	(revision 21402)
@@ -95,5 +95,5 @@
             default:
                 $this->newsCount = $this->lfGetNewsCount();
-                $this->arrNews = $this->lfGetNews(SC_Query_Ex::getSingletonInstance());
+                $this->arrNews = $this->lfGetNews();
                 break;
         }
@@ -126,20 +126,18 @@
      * @return array $arrNewsList 新着情報の配列を返す
      */
-    function lfGetNews(&$objQuery) {
-        $objQuery->setOrder("rank DESC ");
-        $arrNewsList = $objQuery->select('* , cast(news_date as date) as news_date_disp', 'dtb_news' ,'del_flg = 0');
-
-        // モバイルサイトのセッション保持 (#797)
-        if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
-            foreach (array_keys($arrNewsList) as $key) {
-                $arrRow =& $arrNewsList[$key];
-                if (SC_Utils_Ex::isAppInnerUrl($arrRow['news_url'])) {
-                    $netUrl = new Net_URL($arrRow['news_url']);
-                    $netUrl->addQueryString(session_name(), session_id());
-                    $arrRow['news_url'] = $netUrl->getURL();
-                }
-            }
-        }
-
+    function lfGetNews(){
+        $objQuery = SC_Query_Ex::getSingletonInstance();
+        $sql = '';
+        $sql .= " SELECT ";
+        $sql .= "   *, ";
+        $sql .= "   cast(news_date as date) as news_date_disp ";
+        $sql .= " FROM ";
+        $sql .= "   dtb_news ";
+        $sql .= " WHERE ";
+        $sql .= "   del_flg = '0' ";
+        $sql .= " ORDER BY ";
+        $sql .= "   rank DESC ";
+
+        $arrNewsList = $objQuery->getAll($sql);
         return $arrNewsList;
     }
@@ -154,7 +152,7 @@
     function lfGetNewsForJson(&$objFormParam){
 
-        $objQuery =& SC_Query_Ex::getSingletonInstance();
+        $objQuery = SC_Query_Ex::getSingletonInstance();
         $arrData = $objFormParam->getHashArray();
-
+		
         $dispNumber = $arrData['disp_number'];
         $pageNo = $arrData['pageno'];
@@ -163,5 +161,6 @@
         }
 
-        $arrNewsList = $this->lfGetNews($objQuery);
+        $objQuery->setOrder("rank DESC ");
+        $arrNewsList = $objQuery->select(" * , cast(news_date as date) as news_date_disp "," dtb_news "," del_flg = '0' ");
 
         //新着情報の最大ページ数をセット
Index: branches/version-2_11-dev/data/class/pages/products/LC_Page_Products_Review.php
===================================================================
--- branches/version-2_11-dev/data/class/pages/products/LC_Page_Products_Review.php	(revision 21376)
+++ branches/version-2_11-dev/data/class/pages/products/LC_Page_Products_Review.php	(revision 21402)
@@ -164,8 +164,8 @@
         $arrForm = $objFormParam->getHashArray();
 
-        // 重複メッセージの判定
+        //重複メッセージの判定
         $objQuery =& SC_Query_Ex::getSingletonInstance();
-        $exists = $objQuery->exists("dtb_review","product_id = ? AND title = ? ", array($arrForm['product_id'], $arrForm['title']));
-        if ($exists) {
+        $flag = $objQuery->count("dtb_review","product_id = ? AND title = ? ", array($arrForm['product_id'], $arrForm['title']));
+        if ($flag > 0){
             $arrErr['title'] .= "重複したタイトルは登録できません。";
         }
Index: branches/version-2_11-dev/data/class/pages/products/LC_Page_Products_Detail.php
===================================================================
--- branches/version-2_11-dev/data/class/pages/products/LC_Page_Products_Detail.php	(revision 21376)
+++ branches/version-2_11-dev/data/class/pages/products/LC_Page_Products_Detail.php	(revision 21402)
@@ -541,7 +541,7 @@
         } else {
             $objQuery =& SC_Query_Ex::getSingletonInstance();
-            $exists = $objQuery->exists("dtb_customer_favorite_products", "customer_id = ? AND product_id = ?", array($customer_id, $favorite_product_id));
-
-            if (!$exists) {
+            $count = $objQuery->count("dtb_customer_favorite_products", "customer_id = ? AND product_id = ?", array($customer_id, $favorite_product_id));
+
+            if ($count == 0) {
                 $sqlval['customer_id'] = $customer_id;
                 $sqlval['product_id'] = $favorite_product_id;
Index: branches/version-2_11-dev/data/class/SC_Customer.php
===================================================================
--- branches/version-2_11-dev/data/class/SC_Customer.php	(revision 21376)
+++ branches/version-2_11-dev/data/class/SC_Customer.php	(revision 21402)
@@ -121,7 +121,8 @@
 
         // 携帯端末IDが一致し、本登録された会員を検索する。
-        $objQuery = new SC_Query_Ex();
-        $exists = $objQuery->exists("dtb_customer", "mobile_phone_id = ? AND del_flg = 0 AND status = 2", array($_SESSION['mobile']['phone_id']));
-        return $exists;
+        $sql = 'SELECT count(*) FROM dtb_customer WHERE mobile_phone_id = ? AND del_flg = 0 AND status = 2';
+        $objQuery = new SC_Query_Ex();
+        $result = $objQuery->count("dtb_customer", "mobile_phone_id = ? AND del_flg = 0 AND status = 2", array($_SESSION['mobile']['phone_id']));
+        return $result > 0;
     }
 
Index: branches/version-2_11-dev/data/class/helper/SC_Helper_Customer.php
===================================================================
--- branches/version-2_11-dev/data/class/helper/SC_Helper_Customer.php	(revision 21376)
+++ branches/version-2_11-dev/data/class/helper/SC_Helper_Customer.php	(revision 21402)
@@ -276,10 +276,10 @@
      */
     function sfGetUniqSecretKey() {
-        $objQuery =& SC_Query_Ex::getSingletonInstance();
-
-        do {
+        $objQuery   =& SC_Query_Ex::getSingletonInstance();
+        $count      = 1;
+        while ($count != 0) {
             $uniqid = SC_Utils_Ex::sfGetUniqRandomId('r');
-            $exists = $objQuery->exists("dtb_customer", "secret_key = ?", array($uniqid));
-        } while ($exists);
+            $count  = $objQuery->count("dtb_customer", "secret_key = ?", array($uniqid));
+        }
         return $uniqid;
     }
Index: branches/version-2_11-dev/data/class/helper/SC_Helper_Session.php
===================================================================
--- branches/version-2_11-dev/data/class/helper/SC_Helper_Session.php	(revision 21401)
+++ branches/version-2_11-dev/data/class/helper/SC_Helper_Session.php	(revision 21402)
@@ -84,8 +84,7 @@
      {
          $objQuery = new SC_Query_Ex();
-         $exists = $objQuery->exists("dtb_session", "sess_id = ?", array($id));
-var_dump($id, $exists);exit;
+         $count = $objQuery->count("dtb_session", "sess_id = ?", array($id));
          $sqlval = array();
-         if ($exists) {
+         if($count > 0) {
              // レコード更新
              $sqlval['sess_data'] = $sess_data;
Index: branches/version-2_11-dev/data/class/helper/SC_Helper_DB.php
===================================================================
--- branches/version-2_11-dev/data/class/helper/SC_Helper_DB.php	(revision 21376)
+++ branches/version-2_11-dev/data/class/helper/SC_Helper_DB.php	(revision 21402)
@@ -99,6 +99,6 @@
      * @param string $where データを検索する WHERE 句
      * @param string $dsn データソース名
-     * @param string $sql @deprecated データの追加を行う場合の SQL文
-     * @param bool $add @deprecated データの追加も行う場合 true
+     * @param string $sql データの追加を行う場合の SQL文
+     * @param bool $add データの追加も行う場合 true
      * @return bool データが存在する場合 true, データの追加に成功した場合 true,
      *               $add == false で, データが存在しない場合 false
@@ -109,8 +109,13 @@
 
         $objQuery =& SC_Query_Ex::getSingletonInstance();
-        $exists = $objQuery->exists($table_name, $where, $arrval);
-
+        $count = $objQuery->count($table_name, $where, $arrval);
+
+        if($count > 0) {
+            $ret = true;
+        } else {
+            $ret = false;
+        }
         // データを追加する
-        if(!$exists && $add) {
+        if(!$ret && $add) {
             $objQuery->exec($sql);
         }
@@ -153,5 +158,4 @@
      *
      * @return int
-     * @deprecated
      */
     function sfGetBasisCount() {
@@ -159,15 +163,4 @@
 
         return $objQuery->count("dtb_baseinfo");
-    }
-
-    /**
-     * 基本情報の登録有無を取得する
-     *
-     * @return boolean 有無
-     */
-    function sfGetBasisExists() {
-        $objQuery =& SC_Query_Ex::getSingletonInstance();
-
-        return $objQuery->exists('dtb_baseinfo');
     }
 
@@ -1438,7 +1431,7 @@
         $objQuery =& SC_Query_Ex::getSingletonInstance();
         $where = 'product_id = ? AND del_flg = 0 AND class_combination_id IS NOT NULL';
-        $exists = $objQuery->exists('dtb_products_class', $where, array($product_id));
-
-        return $exists;
+        $count = $objQuery->count('dtb_products_class', $where, array($product_id));
+
+        return $count >= 1;
     }
 }
Index: branches/version-2_11-dev/data/class/helper/SC_Helper_Mobile.php
===================================================================
--- branches/version-2_11-dev/data/class/helper/SC_Helper_Mobile.php	(revision 21376)
+++ branches/version-2_11-dev/data/class/helper/SC_Helper_Mobile.php	(revision 21402)
@@ -384,7 +384,7 @@
             $arrValues['kara_mail_id'] = $objQuery->nextVal('dtb_mobile_kara_mail_kara_mail_id');
             $objQuery->insert('dtb_mobile_kara_mail', $arrValues);
-            $exists = $objQuery->exists('dtb_mobile_kara_mail', 'token = ?', array($token));
-
-            if ($exists) {
+            $count = $objQuery->count('dtb_mobile_kara_mail', 'token = ?', array($token));
+
+            if ($count == 1) {
                 break;
             }
Index: branches/version-2_11-dev/data/class/helper/SC_Helper_PageLayout.php
===================================================================
--- branches/version-2_11-dev/data/class/helper/SC_Helper_PageLayout.php	(revision 21376)
+++ branches/version-2_11-dev/data/class/helper/SC_Helper_PageLayout.php	(revision 21402)
@@ -210,7 +210,7 @@
          * PHP ファイルは, 複数のデバイスで共有するため, device_type_id を条件に入れない
          */
-        $exists = $objQuery->exists('dtb_pagelayout', 'filename = ?', array($filename));
-
-        if (!$exists) {
+        $count = $objQuery->count('dtb_pagelayout', 'filename = ?', array($filename));
+
+        if ($count == 0) {
             // phpファイルの削除
             $del_php = HTML_REALDIR . $filename . '.php';
Index: branches/version-2_11-dev/data/class/helper/SC_Helper_Purchase.php
===================================================================
--- branches/version-2_11-dev/data/class/helper/SC_Helper_Purchase.php	(revision 21376)
+++ branches/version-2_11-dev/data/class/helper/SC_Helper_Purchase.php	(revision 21402)
@@ -833,6 +833,6 @@
         $arrValues = $objQuery->extractOnlyColsOf($table, $arrParams);
 
-        $exists = $objQuery->exists($table, $where, array($order_id));
-        if ($exists) {
+        $exists = $objQuery->count($table, $where, array($order_id));
+        if ($exists > 0) {
 
             $this->sfUpdateOrderStatus($order_id, $arrValues['status'],
Index: branches/version-2_11-dev/data/class/SC_Query.php
===================================================================
--- branches/version-2_11-dev/data/class/SC_Query.php	(revision 21376)
+++ branches/version-2_11-dev/data/class/SC_Query.php	(revision 21402)
@@ -106,5 +106,5 @@
 
     /**
-     * エラー判定を行う.
+     *  エラー判定を行う.
      *
      * @deprecated PEAR::isError() を使用して下さい
@@ -126,21 +126,12 @@
      * @return integer 件数
      */
-    function count($table, $where = '', $arrWhereVal = array()) {
-        return $this->get('COUNT(*)', $table, $where, $arrWhereVal);
-    }
-
-    /**
-     * EXISTS文を実行する.
-     *
-     * @param string $table テーブル名
-     * @param string $where where句
-     * @param array $arrWhereVal プレースホルダ
-     * @return boolean 有無
-     */
-    function exists($table, $where = '', $arrWhereVal = array()) {
-        $sql_inner = $this->getSql('*', $table, $where, $arrWhereVal);
-        $sql = "SELECT CASE WHEN EXISTS($sql_inner) THEN 1 ELSE 0 END";
-        $res = $this->getOne($sql, $arrWhereVal);
-        return (bool)$res;
+    function count($table, $where = "", $arrWhereVal = array()) {
+        if(strlen($where) <= 0) {
+            $sqlse = "SELECT COUNT(*) FROM $table";
+        } else {
+            $sqlse = "SELECT COUNT(*) FROM $table WHERE $where";
+        }
+        $sqlse = $this->dbFactory->sfChangeMySQL($sqlse);
+        return $this->getOne($sqlse, $arrWhereVal);
     }
 
@@ -279,11 +270,5 @@
         }
 
-        // MySQL での不具合対応のため、一旦変数に退避
-        $arrRet = $affected->fetchAll($fetchmode);
-
-        // PREPAREの解放
-        $sth->free();
-
-        return $arrRet;
+        return $affected->fetchAll($fetchmode);
     }
 
@@ -469,13 +454,10 @@
      * @param string $table テーブル名
      * @param array $sqlval array('カラム名' => '値',...)の連想配列
-     * @param array $arrSql array('カラム名' => 'SQL文',...)の連想配列
-     * @param array $arrSqlVal SQL文の中で使用するプレースホルダ配列
      * @return
      */
-    function insert($table, $sqlval, $arrSql = array(), $arrSqlVal = array()) {
+    function insert($table, $sqlval) {
         $strcol = '';
         $strval = '';
         $find = false;
-        $arrVal = array();
 
         if(count($sqlval) <= 0 ) return false;
@@ -488,16 +470,8 @@
             } else {
                 $strval .= '?,';
-                $arrVal[] = $val;
+                $arrval[] = $val;
             }
             $find = true;
         }
-
-        foreach($arrSql as $key => $val) {
-            $strcol .= $key . ',';
-            $strval .= $val . ',';
-        }
-
-        $arrVal = array_merge($arrVal, $arrSqlVal);
-
         if(!$find) {
             return false;
@@ -508,5 +482,5 @@
         $sqlin = "INSERT INTO $table(" . $strcol. ") VALUES (" . $strval . ")";
         // INSERT文の実行
-        $ret = $this->query($sqlin, $arrVal, false, null, MDB2_PREPARE_MANIP);
+        $ret = $this->query($sqlin, $arrval, false, null, MDB2_PREPARE_MANIP);
 
         return $ret;
@@ -635,11 +609,5 @@
         }
 
-        // MySQL での不具合対応のため、一旦変数に退避
-        $arrRet = $affected->fetchOne();
-
-        // PREPAREの解放
-        $sth->free();
-
-        return $arrRet;
+        return $affected->fetchOne();
     }
 
@@ -669,11 +637,5 @@
         }
 
-        // MySQL での不具合対応のため、一旦変数に退避
-        $arrRet = $affected->fetchRow($fetchmode);
-
-        // PREPAREの解放
-        $sth->free();
-
-        return $arrRet;
+        return $affected->fetchRow($fetchmode);
     }
 
@@ -701,11 +663,5 @@
         }
 
-        // MySQL での不具合対応のため、一旦変数に退避
-        $arrRet = $affected->fetchCol();
-
-        // PREPAREの解放
-        $sth->free();
-
-        return $arrRet;
+        return $affected->fetchCol();
     }
 
@@ -788,5 +744,5 @@
         }
 
-        // PREPAREの解放
+        //PREPAREの解放
         $sth->free();
 
@@ -1017,5 +973,5 @@
         }
         $arrRet = $result->getColumnNames();
-        // PREPAREの解放
+        //PREPAREの解放
         $sth->free();
 
Index: branches/version-2_11-dev/data/class/util/SC_Utils.php
===================================================================
--- branches/version-2_11-dev/data/class/util/SC_Utils.php	(revision 21374)
+++ branches/version-2_11-dev/data/class/util/SC_Utils.php	(revision 21402)
@@ -2163,9 +2163,4 @@
         return is_dir($pathname) || @mkdir($pathname, $mode);
     }
-
-    function isAppInnerUrl($url) {
-        $pattern = '/^(' . preg_quote(HTTP_URL, '/') . '|' . preg_quote(HTTPS_URL, '/') . ')/';
-        return preg_match($pattern, $url) >= 1;
-    }
 }
 ?>
