[Pmapper-users] problem with REQUIRES

2006-03-06 Thread Armin Burger
this is a generic Mapserver problem, discussed on the MS mailing list. Please see also http://www.pmapper.net/wiki/index.php?title=FAQ Armin Roberto Starnini wrote: > Hi all, > > I use pmapper 1.9.5 and I have a problem with the option REQUIRES in map > layer. When I set more than one REQUIR

[Pmapper-users] problem with REQUIRES

2006-03-06 Thread Roberto Starnini
/pipermail/pmapper-users/attachments/20060306/dee52881/attachment-0001.htm

[Pmapper-users] Some (small) enhancements

2006-03-06 Thread Armin Burger
Thanks for the files. Silke Reimer wrote: > Hallo! > > Some time ago I told you that we made some small enhancements to > p.mapper and wanted to contribute them to the main source. > > Finally I found the time to download the actual p.mapper and try to > apply our patches to it (the patches wher

[Pmapper-users] Some (small) enhancements

2006-03-06 Thread Silke Reimer
// Get properties for DB table join +function returnTableJoinProperties() +{ +if ($this->glayer->getTableJoin()) { +//$dsn, $fromTable, $fromField, $fromFieldType, $joinFields, $toField, $one2many +require_once ("DB.php"); +$joinList = $this->glayer->getTableJoin(); + +// Join table properties +$fromTable = $joinList["fromTable"]; +$fromField = $joinList["fromField"]; +$this->fromFieldType = $joinList["fromFieldType"]; +$this->joinFields = $joinList["joinFields"]; + +// Layer field to join TO +$this->toField = $joinList["toField"]; + +// Join type: one-to-one (0) or one-to-many (1) +$this->one2many = $joinList["one2many"]; + +// Connnect to DB +$dsn = $joinList["dsn"]; +$dbh = $this->dbConnect($dsn); + +if (!$dbh) error_log ("Could not connect to DB defined for Layer '" +. $this->glayer->getLayerName() . "'. Check map file entry for JOIN definition.", 0); +} + +$this->sql = "SELECT " . $this->joinFields . " FROM $fromTable WHERE $fromField="; +$this->dbh = $dbh; + +$this->joinList = $joinList; +} + + + +// Get data from DB +function returnData($dbh, $sql, $toValue, $fromFieldType) +{ +$quote = ($fromFieldType == "1" ? "'" : ""); +$sqlRun = $sql.$quote.$toValue.$quote; +#echo $sqlRun; +$data = $dbh->getAll($sqlRun); // For 1:n Joins +#$data = $dbh->getRow($sqlRun); +return $data; +} + +function getFieldHeaderStr($selHeaders) { + + $pStr = ''; +for ($iRes=0; $iRes < $this->numResults; $iRes++) { +$qRes = $this->qLayer->getResult($iRes); +$qShape = $this->qLayer->getShape($qRes->tileindex,$qRes->shapeindex); + $pStr .= ($this->qLayerType != 3 ? $this->printShapeField($qShape) : ""); + } + return $pStr; +} + + +} // end CLASS VQUERY + + + + +?> -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://faunalia.it/pipermail/pmapper-users/attachments/20060306/fc826fa6/attachment.pgp

[Pmapper-users] Pmapper2

2006-03-06 Thread Stephan Holl
Hello Armin, On Sun, 05 Mar 2006 19:58:51 +0100 Armin Burger wrote: > this is a JS error caused by a previous *PHP error*. So please check > your PHP error log. PHP errors are just written into the apache log > if not specified differently in the php.ini. thanks for the fast answer. I need to