Index: branches/feature-module-update/data/class/SC_Query.php
===================================================================
--- branches/rel/data/class/SC_Query.php	(revision 14921)
+++ branches/feature-module-update/data/class/SC_Query.php	(revision 15078)
@@ -13,8 +13,8 @@
 	var $order;
 	
-	// ¥³¥ó¥¹¥È¥é¥¯¥¿
+	// コンストラクタ
 	/*
-		$err_disp:¥¨¥é¡¼É½¼¨¤ò¹Ô¤¦¤«
-		$new¡§¿·µ¬¤ËÀÜÂ³¤ò¹Ô¤¦¤«
+		$err_disp:エラー表示を行うか
+		$new：新規に接続を行うか
 	 */
 	function SC_Query($dsn = "", $err_disp = true, $new = false) {
@@ -24,5 +24,5 @@
 	}
 	
-	// ¥¨¥é¡¼È½Äê
+	// エラー判定
 	function isError() {
 		if(PEAR::isError($this->conn->conn)) {
@@ -32,5 +32,5 @@
 	}
 	
-	// COUNTÊ¸¤Î¼Â¹Ô
+	// COUNT文の実行
 	function count($table, $where = "", $arrval = array()) {
 		if(strlen($where) <= 0) {
@@ -39,5 +39,5 @@
 			$sqlse = "SELECT COUNT(*) FROM $table WHERE $where";
 		}
-		// ¥«¥¦¥ó¥ÈÊ¸¤Î¼Â¹Ô
+		// カウント文の実行
 		$ret = $this->conn->getOne($sqlse, $arrval);
 		return $ret;
@@ -107,5 +107,5 @@
 	function getsql($col, $table, $where) {
 		if($where != "") {
-			// °ú¿ô¤Î$where¤òÍ¥Àè¤·¤Æ¼Â¹Ô¤¹¤ë¡£
+			// 引数の$whereを優先して実行する。
 			$sqlse = "SELECT $col FROM $table WHERE $where " . $this->groupby . " " . $this->order . " " . $this->option;
 		} else {
@@ -179,7 +179,7 @@
 	
 	
-	// INSERTÊ¸¤ÎÀ¸À®¡¦¼Â¹Ô
-	// $table	:¥Æ¡¼¥Ö¥ëÌ¾
-	// $sqlval	:ÎóÌ¾ => ÃÍ¤Î³ÊÇ¼¤µ¤ì¤¿¥Ï¥Ã¥·¥åÇÛÎó
+	// INSERT文の生成・実行
+	// $table	:テーブル名
+	// $sqlval	:列名 => 値の格納されたハッシュ配列
 	function insert($table, $sqlval) {
 		$strcol = '';
@@ -206,11 +206,11 @@
 			return false;
 		}
-		// Ê¸Ëö¤Î","¤òºï½ü
+		// 文末の","を削除
 		$strcol = ereg_replace(",$","",$strcol);
-		// Ê¸Ëö¤Î","¤òºï½ü
+		// 文末の","を削除
 		$strval = ereg_replace(",$","",$strval);
 		$sqlin = "INSERT INTO $table(" . $strcol. ") VALUES (" . $strval . ")";
 		
-		// INSERTÊ¸¤Î¼Â¹Ô
+		// INSERT文の実行
 		$ret = $this->conn->query($sqlin, $arrval);
 		
@@ -218,7 +218,7 @@
 	}
 	
-		// INSERTÊ¸¤ÎÀ¸À®¡¦¼Â¹Ô
-	// $table	:¥Æ¡¼¥Ö¥ëÌ¾
-	// $sqlval	:ÎóÌ¾ => ÃÍ¤Î³ÊÇ¼¤µ¤ì¤¿¥Ï¥Ã¥·¥åÇÛÎó
+		// INSERT文の生成・実行
+	// $table	:テーブル名
+	// $sqlval	:列名 => 値の格納されたハッシュ配列
 	function fast_insert($table, $sqlval) {
 		$strcol = '';
@@ -239,11 +239,11 @@
 			return false;
 		}
-		// Ê¸Ëö¤Î","¤òºï½ü
+		// 文末の","を削除
 		$strcol = ereg_replace(",$","",$strcol);
-		// Ê¸Ëö¤Î","¤òºï½ü
+		// 文末の","を削除
 		$strval = ereg_replace(",$","",$strval);
 		$sqlin = "INSERT INTO $table(" . $strcol. ") VALUES (" . $strval . ")";
 		
-		// INSERTÊ¸¤Î¼Â¹Ô
+		// INSERT文の実行
 		$ret = $this->conn->query($sqlin);
 		
@@ -252,8 +252,8 @@
 	
 	
-	// UPDATEÊ¸¤ÎÀ¸À®¡¦¼Â¹Ô
-	// $table	:¥Æ¡¼¥Ö¥ëÌ¾
-	// $sqlval	:ÎóÌ¾ => ÃÍ¤Î³ÊÇ¼¤µ¤ì¤¿¥Ï¥Ã¥·¥åÇÛÎó
-	// $where	:WHEREÊ¸»úÎó
+	// UPDATE文の生成・実行
+	// $table	:テーブル名
+	// $sqlval	:列名 => 値の格納されたハッシュ配列
+	// $where	:WHERE文字列
 	function update($table, $sqlval, $where = "", $arradd = "", $addcol = "") {
 		$strcol = '';
@@ -283,7 +283,7 @@
 		}
 				
-		// Ê¸Ëö¤Î","¤òºï½ü
+		// 文末の","を削除
 		$strcol = ereg_replace(",$","",$strcol);
-		// Ê¸Ëö¤Î","¤òºï½ü
+		// 文末の","を削除
 		$strval = ereg_replace(",$","",$strval);
 		
@@ -295,5 +295,5 @@
 		
 		if(is_array($arradd)) {
-			// ¥×¥ì¡¼¥¹¥Û¥ë¥À¡¼ÍÑ¤ËÇÛÎó¤òÄÉ²Ã
+			// プレースホルダー用に配列を追加
 			foreach($arradd as $val) {
 				$arrval[] = $val;
@@ -301,10 +301,10 @@
 		}
 		
-		// INSERTÊ¸¤Î¼Â¹Ô
+		// INSERT文の実行
 		$ret = $this->conn->query($sqlup, $arrval);
 		return $ret;		
 	}
 
-	// MAXÊ¸¤Î¼Â¹Ô
+	// MAX文の実行
 	function max($table, $col, $where = "", $arrval = array()) {
 		if(strlen($where) <= 0) {
@@ -313,10 +313,10 @@
 			$sqlse = "SELECT MAX($col) FROM $table WHERE $where";
 		}
-		// MAXÊ¸¤Î¼Â¹Ô
+		// MAX文の実行
 		$ret = $this->conn->getOne($sqlse, $arrval);
 		return $ret;
 	}
 	
-	// MINÊ¸¤Î¼Â¹Ô
+	// MIN文の実行
 	function min($table, $col, $where = "", $arrval = array()) {
 		if(strlen($where) <= 0) {
@@ -325,10 +325,10 @@
 			$sqlse = "SELECT MIN($col) FROM $table WHERE $where";
 		}
-		// MINÊ¸¤Î¼Â¹Ô
+		// MIN文の実行
 		$ret = $this->conn->getOne($sqlse, $arrval);
 		return $ret;
 	}
 	
-	// ÆÃÄê¤Î¥«¥é¥à¤ÎÃÍ¤ò¼èÆÀ
+	// 特定のカラムの値を取得
 	function get($table, $col, $where = "", $arrval = array()) {
 		if(strlen($where) <= 0) {
@@ -337,5 +337,5 @@
 			$sqlse = "SELECT $col FROM $table WHERE $where";
 		}
-		// SQLÊ¸¤Î¼Â¹Ô
+		// SQL文の実行
 		$ret = $this->conn->getOne($sqlse, $arrval);
 		return $ret;
@@ -343,5 +343,5 @@
 	
 	function getone($sql, $arrval = array()) {
-		// SQLÊ¸¤Î¼Â¹Ô
+		// SQL文の実行
 		$ret = $this->conn->getOne($sql, $arrval);
 		return $ret;
@@ -349,5 +349,5 @@
 	}
 		
-	// °ì¹Ô¤ò¼èÆÀ
+	// 一行を取得
 	function getrow($table, $col, $where = "", $arrval = array()) {
 		if(strlen($where) <= 0) {
@@ -356,5 +356,5 @@
 			$sqlse = "SELECT $col FROM $table WHERE $where";
 		}
-		// SQLÊ¸¤Î¼Â¹Ô
+		// SQL文の実行
 		$ret = $this->conn->getRow($sqlse, $arrval);
 		
@@ -362,5 +362,5 @@
 	}
 		
-	// ¥ì¥³¡¼¥É¤Îºï½ü
+	// レコードの削除
 	function delete($table, $where = "", $arrval = array()) {
 		if(strlen($where) <= 0) {
@@ -375,5 +375,5 @@
 	function nextval($table, $colname) {
 		$sql = "";
-		// postgresql¤Èmysql¤È¤Ç½èÍý¤òÊ¬¤±¤ë
+		// postgresqlとmysqlとで処理を分ける
 		if (DB_TYPE == "pgsql") {
 			$seqtable = $table . "_" . $colname . "_seq";
@@ -419,17 +419,17 @@
 	}
 	
-    // auto_increment¤ò¼èÆÀ¤¹¤ë
+    // auto_incrementを取得する
     function get_auto_increment($table_name){
-        // ¥í¥Ã¥¯¤¹¤ë
+        // ロックする
         $this->query("LOCK TABLES $table_name WRITE");
         
-        // ¼¡¤ÎIncrement¤ò¼èÆÀ
+        // 次のIncrementを取得
         $arrRet = $this->getAll("SHOW TABLE STATUS LIKE ?", array($table_name));
         $auto_inc_no = $arrRet[0]["Auto_increment"];
         
-        // ÃÍ¤ò¥«¥¦¥ó¥È¥¢¥Ã¥×¤·¤Æ¤ª¤¯
+        // 値をカウントアップしておく
         $this->conn->query("ALTER TABLE $table_name AUTO_INCREMENT=?" , $auto_inc_no + 1);
         
-        // ²ò½ü¤¹¤ë
+        // 解除する
         $this->query('UNLOCK TABLES');
         
