svn commit: r143 - trunk/mapbender/http/php/database-pgsql.php
uli at osgeo.org
uli at osgeo.org
Mon Apr 24 08:57:26 EDT 2006
Author: uli
Date: 2006-04-24 12:57:26+0000
New Revision: 143
Modified:
trunk/mapbender/http/php/database-pgsql.php
Log:
db_prep_query now works with more than $9
Modified: trunk/mapbender/http/php/database-pgsql.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/php/database-pgsql.php?view=diff&rev=143&p1=trunk/mapbender/http/php/database-pgsql.php&p2=trunk/mapbender/http/php/database-pgsql.php&r1=142&r2=143
==============================================================================
--- trunk/mapbender/http/php/database-pgsql.php (original)
+++ trunk/mapbender/http/php/database-pgsql.php 2006-04-24 12:57:26+0000
@@ -161,7 +161,9 @@
if($types[$i] == 's'){ $tmp .= "'"; }
$tmp .= $params[$i];
if($types[$i] == 's'){ $tmp .= "'"; }
- $qstring = str_replace($needle, $tmp, $qstring);
+ $posa = strpos($qstring, $needle);
+ $posb = strlen($needle);
+ $qstring = substr($qstring,0,$posa).$tmp.substr($qstring,($posa + $posb));
}
$r = db_query($qstring);
return $r;
More information about the Mapbender_commits
mailing list