Index: trunk/xpressme_integration_kit/include/general_functions.php
===================================================================
--- trunk/xpressme_integration_kit/include/general_functions.php	(revision 264)
+++ trunk/xpressme_integration_kit/include/general_functions.php	(revision 414)
@@ -119,3 +119,36 @@
 }
 
+// Get Multi Blog table list for WordPressMU 
+if (!function_exists('get_multi_table_list')){
+	function get_table_list($wp_prefix = '',$table_name = ''){
+		global $xoopsDB,$xoops_db;
+
+		$table_list = array();
+		$ret = array();
+		if (!empty($wp_prefix) && !empty($table_name)){
+			$sql = "SHOW TABLES LIKE '" . $wp_prefix  . '%' . $table_name . "'";
+
+			if (empty($xoops_db)) { // not load XPressME			
+				if($result = $xoopsDB->queryF($sql)){
+					while($row = $xoopsDB->fetchRow($result)){
+						$table_list[] = $row[0];
+					}
+				}
+			} else { // load XPressME or not Load XOOPS
+				$table_list = $xoops_db->get_results($sql);
+			}			
+		}
+		return $table_list;
+	}
+}
+
+// Get Middle Prefix from Table name for WordPressMU 
+if (!function_exists('get_multi_mid_prefix')){
+	function get_multi_mid_prefix($wp_prefix = '',$table_name = '' , $full_table_name){
+		$pattern = '/' . $wp_prefix . '(.*)' . $table_name . '/';
+		preg_match($pattern,$full_table_name,$match);
+		return $match[1];
+	}
+}
+
 ?>
