[Mapbender-commits] r1994 - branches/2.5/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Sun Jan 20 10:52:04 EST 2008


Author: christoph
Date: 2008-01-20 10:52:04 -0500 (Sun, 20 Jan 2008)
New Revision: 1994

Modified:
   branches/2.5/http/javascripts/mod_addWMSfromList.php
   branches/2.5/http/javascripts/mod_addWMSfromfilteredList.php
   branches/2.5/http/javascripts/mod_addWMSfromfilteredListDB.php
Log:
prepared statements

Modified: branches/2.5/http/javascripts/mod_addWMSfromList.php
===================================================================
--- branches/2.5/http/javascripts/mod_addWMSfromList.php	2008-01-20 14:12:55 UTC (rev 1993)
+++ branches/2.5/http/javascripts/mod_addWMSfromList.php	2008-01-20 15:52:04 UTC (rev 1994)
@@ -112,8 +112,8 @@
 $sql_gui = "SELECT * FROM gui WHERE gui_id IN (";
 $v = $arrayGuis;
 $t = array();
-for ($i = 0; $i < count($arrayGuis); $i++){
-	if ($i > 0) { 
+for ($i = 1; $i <= count($arrayGuis); $i++){
+	if ($i > 1) { 
 		$sql_gui .= ",";
 	}
 	$sql_gui .= "$" . $i;
@@ -133,8 +133,8 @@
 $sql_gui_wms = "SELECT DISTINCT fkey_wms_id FROM gui_wms WHERE fkey_gui_id IN (";
 $v = $arrayGuis;
 $t = array();
-for ($i = 0; $i < count($arrayGuis); $i++){
-	if ($i > 0) { 
+for ($i = 1; $i <= count($arrayGuis); $i++){
+	if ($i > 1) { 
 		$sql_gui_wms .= ",";
 	}
 	$sql_gui_wms .= "$".$i;
@@ -154,8 +154,8 @@
 $sql_wms = "SELECT DISTINCT wms_title, wms_abstract, wms_getcapabilities,wms_version FROM wms WHERE wms_id IN (";
 $v = $fkey_wms_id;
 $t = array();
-for ($i = 0; $i < count($fkey_wms_id); $i++){
-	if ($i > 0) { 
+for ($i = 1; $i <= count($fkey_wms_id); $i++){
+	if ($i > 1) { 
 		$sql_wms .= ",";
 	}
 	$sql_wms .= "$" . $i;

Modified: branches/2.5/http/javascripts/mod_addWMSfromfilteredList.php
===================================================================
--- branches/2.5/http/javascripts/mod_addWMSfromfilteredList.php	2008-01-20 14:12:55 UTC (rev 1993)
+++ branches/2.5/http/javascripts/mod_addWMSfromfilteredList.php	2008-01-20 15:52:04 UTC (rev 1994)
@@ -251,7 +251,7 @@
 $t = array();
 
 for ($i = 1; $i <= count($arrayGuis); $i++){
-	if ($i > 0) { 
+	if ($i > 1) { 
 		$sql_gui .= ",";
 	}
 	$sql_gui .= "$" . $i;
@@ -274,8 +274,8 @@
 $sql_gui_wms = "SELECT DISTINCT fkey_wms_id, fkey_gui_id FROM gui_wms WHERE fkey_gui_id IN (";
 $v = $arrayGuis;
 $t = array();
-for ($i = 0; $i < count($arrayGuis); $i++){
-	if ($i > 0) { 
+for ($i = 1; $i <= count($arrayGuis); $i++){
+	if ($i > 1) { 
 		$sql_gui_wms .= ",";
 	}
 	$sql_gui_wms .= "$".$i;
@@ -295,8 +295,8 @@
 $sql_wms = "SELECT DISTINCT wms_title, wms_abstract, wms_getcapabilities, wms_version FROM wms WHERE wms_id IN (";
 $v = $fkey_wms_id;
 $t = array();
-for ($i = 0; $i < count($fkey_wms_id); $i++){
-	if ($i > 0) { 
+for ($i = 1; $i <= count($fkey_wms_id); $i++){
+	if ($i > 1) { 
 		$sql_wms .= ",";
 	}
 	$sql_wms .= "$".$i;
@@ -357,8 +357,8 @@
 		$sql_fkey_group_gui_wms = "SELECT DISTINCT fkey_wms_id, fkey_gui_id FROM gui_wms WHERE fkey_gui_id IN (";
 		$v = $group_gui_id;
 		$t = array();
-		for ($i = 0; $i < count($group_gui_id); $i++){
-			if ($i > 0) { 
+		for ($i = 1; $i <= count($group_gui_id); $i++){
+			if ($i > 1) { 
 				$sql_fkey_group_gui_wms .= ",";
 			}
 			$sql_fkey_group_gui_wms .= "$".$i;
@@ -381,8 +381,8 @@
 			$sql_group_gui_wms = "SELECT DISTINCT wms_title, wms_abstract, wms_getcapabilities, wms_version FROM wms WHERE wms_id IN (";
 			$v = $fkey_group_gui_wms_id;
 			$t = array();
-			for ($i = 0; $i < count($fkey_group_gui_wms_id); $i++){
-				if ($i > 0) { 
+			for ($i = 1; $i <= count($fkey_group_gui_wms_id); $i++){
+				if ($i > 1) { 
 					$sql_group_gui_wms .= ",";
 				}
 				$sql_group_gui_wms .= "$".$i;
@@ -472,8 +472,8 @@
 		$sql_show_gui_wms = "SELECT DISTINCT wms_title, wms_abstract, wms_getcapabilities, wms_id, wms_version FROM wms WHERE wms_id IN (";
 		$v = $fkey_show_gui_wms_id;
 		$t = array();
-		for ($i = 0; $i < count($fkey_show_gui_wms_id); $i++){
-			if ($i > 0) { 
+		for ($i = 1; $i <= count($fkey_show_gui_wms_id); $i++){
+			if ($i > 1) { 
 				$sql_show_gui_wms .= ",";
 			}
 			$sql_show_gui_wms .= "$".$i;
@@ -566,8 +566,8 @@
 		$sql_show_gui_wms = "SELECT DISTINCT wms_title, wms_abstract, wms_getcapabilities, wms_id, wms_version FROM wms WHERE wms_id IN (";
 		$v = $fkey_show_gui_wms_id;
 		$t = array();
-		for ($i = 0; $i < count($fkey_show_gui_wms_id); $i++){
-			if ($i > 0) { 
+		for ($i = 1; $i <= count($fkey_show_gui_wms_id); $i++){
+			if ($i > 1) { 
 				$sql_show_gui_wms .= ",";
 			}
 			$sql_show_gui_wms .= "$".$i;

Modified: branches/2.5/http/javascripts/mod_addWMSfromfilteredListDB.php
===================================================================
--- branches/2.5/http/javascripts/mod_addWMSfromfilteredListDB.php	2008-01-20 14:12:55 UTC (rev 1993)
+++ branches/2.5/http/javascripts/mod_addWMSfromfilteredListDB.php	2008-01-20 15:52:04 UTC (rev 1994)
@@ -103,8 +103,8 @@
 $sql_gui = "SELECT * FROM gui WHERE gui_id IN (";
 $v = $arrayGuis;
 $t = array();
-for ($i = 0; $i < count($arrayGuis); $i++){
-	if ($i > 0) { 
+for ($i = 1; $i <= count($arrayGuis); $i++){
+	if ($i > 1) { 
 		$sql_gui .= ",";
 	}
 	$sql_gui .= "$" . $i;
@@ -126,8 +126,8 @@
 $sql_gui_wms = "SELECT DISTINCT fkey_wms_id, fkey_gui_id FROM gui_wms WHERE fkey_gui_id IN (";
 $v = $arrayGuis;
 $t = array();
-for ($i = 0; $i < count($arrayGuis); $i++) {
-	if ($i > 0) { 
+for ($i = 1; $i <= count($arrayGuis); $i++) {
+	if ($i > 1) { 
 		$sql_gui_wms .= ",";
 	}
 	$sql_gui_wms .= "$".$i;
@@ -147,8 +147,8 @@
 $sql_wms = "SELECT DISTINCT wms_title, wms_abstract, wms_getcapabilities, wms_version FROM wms WHERE wms_id IN (";
 $v = $fkey_wms_id;
 $t = array();
-for ($i = 0; $i < count($fkey_wms_id); $i++){
-	if ($i > 0) { 
+for ($i = 1; $i <= count($fkey_wms_id); $i++){
+	if ($i > 1) { 
 		$sql_wms .= ",";
 	}
 	$sql_wms .= "$" . $i;
@@ -212,8 +212,8 @@
 		$sql_show_gui_wms = "SELECT DISTINCT wms_title, wms_abstract, wms_getcapabilities, wms_id, wms_version FROM wms WHERE wms_id IN (";
 		$v = $fkey_show_gui_wms_id;
 		$t = array();
-		for ($i = 0; $i < count($fkey_show_gui_wms_id); $i++){
-			if ($i > 0) { 
+		for ($i = 1; $i <= count($fkey_show_gui_wms_id); $i++){
+			if ($i > 1) { 
 				$sql_show_gui_wms .= ",";
 			}
 			$sql_show_gui_wms .= "$".$i;



More information about the Mapbender_commits mailing list