[MS4W-Users] Query parameter in MapFile

Darko Kovacevski d.kovacevski at ins.com.mk
Fri Jan 15 06:56:51 EST 2016

I found the solution.

The problem was that I haven't add validation section in the layer.



     "PID" "^[0-9]+$"







From: Darko Kovacevski [mailto:d.kovacevski at ins.com.mk] 
Sent: Friday, January 15, 2016 12:37 PM
To: 'ms4w-users at lists.ms4w.com'
Subject: Query parameter in MapFile


Hi all,


I'm using postgis for database, and for one layer  I want to use postgres
function for a data source. But the problem is that my function except input
parameter, and I want this parameter to be the the one from the query


Here is my code:


  DATA "geom from (select * from test(%PID%))  as subquery using SRID=32634
using unique mykey" 


But there is syntax error at  "%" that I cannot fix.


With hardcoded value it works:

  DATA "geom from (select * from test(10))  as subquery using SRID=32634
using unique mykey"


I will be grateful for any help you can provide,


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ms4w.com/mailman/private/ms4w-users/attachments/20160115/d65fce74/attachment.html>

More information about the MS4W-Users mailing list