svn commit: r142 - trunk/mapbender/http/php/database-mysql.php
uli at osgeo.org
uli at osgeo.org
Mon Apr 24 08:56:11 EDT 2006
Author: uli
Date: 2006-04-24 12:56:10+0000
New Revision: 142
Modified:
trunk/mapbender/http/php/database-mysql.php
Log:
db_prep_query now works with more than $9
Modified: trunk/mapbender/http/php/database-mysql.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/php/database-mysql.php?view=diff&rev=142&p1=trunk/mapbender/http/php/database-mysql.php&p2=trunk/mapbender/http/php/database-mysql.php&r1=141&r2=142
==============================================================================
--- trunk/mapbender/http/php/database-mysql.php (original)
+++ trunk/mapbender/http/php/database-mysql.php 2006-04-24 12:56:10+0000
@@ -180,7 +180,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