Hi, One issue remains still ..
"http://gis.rtbi-iitm.in/cgi-bin/mapserv?map=/var/www/html/customisation/map file/customNR.map&userid=2" is working ok with DATA "the_geom from ( select * from customised_poly AS f where f.subcat_id IN (select subcat_id from subcat_info where maincat_id =0) AND user_id='%userid%' )AS foo1 USING UNIQUE gid" but "http://gis.rtbi-iitm.in/cgi-bin/mapserv?map=/var/www/html/customisation/map file/customNR.map&userid=user_id" where I am retrieving user_id from a php file n on alerting it gives integer value(2) only is working with DATA "the_geom from ( select * from customised_poly AS f where f.subcat_id IN (select subcat_id from subcat_info where maincat_id =0) AND user_id=%userid% )AS foo1 USING UNIQUE gid" and in this case user_id is not affecting result on map I tried parsing it to integer but didn't work. and on putting user_id='%userid%' ..its showing query error Thanks, Reena. Arnd Wippermann wrote: > > You can try to add the param to the url > > "http://gis.rtbi-iitm.in/cgi-bin/mapserv?map=/var/www/html/customisation/map > file/customNR.map&userid=anID" > > and in the mapfile try user_id='%userid%'. In special cases it is possible > per cgi-parameter manipulate the mapfile. I don't no if this case is one > of > them. > > Try the mapserver-list, because it is not an OpenLayers issue. > > To retrieve more than one layer with OpenLayers WMS you use > > {'layers' : 'NR_point,NR_polygon', 'transparent' : true, ... }, ... > > a comma-separatet list as christopher mentioned. > > Arnd Wippermann > > > -----Ursprüngliche Nachricht----- > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im > Auftrag von S.Reena > Gesendet: Freitag, 7. November 2008 10:39 > An: [email protected] > Betreff: [OpenLayers-Users] Pass parameters to mapfile > > > I am using the following data in my mapfile > > DATA "the_geom from ( select * from customised_point AS f where > user_id='userid' AND f.subcat_id IN (select subcat_id from subcat_info > where > maincat_id =0))AS foo USING UNIQUE gid" > > > I want the userid ( used in the above query) to be passed to map file at > the > time of layer creation something like this.... > > wms[5] = new OpenLayers.Layer.WMS.Untiled( > > "Customization","http://gis.rtbi-iitm.in/cgi-bin/mapserv?map=/var/www/html/c > ustomisation/mapfile/customNR.map" > + userid ,{'layers': "NR_point",'transparent':"true"},{'layers': > "NR_polygon",'transparent':"true"},{'isBaseLayer':false} ); > > How to do that? > > Thanks in advance :) > > Cheers, > Reena. > -- > View this message in context: > http://www.nabble.com/Pass-parameters-to-mapfile-tp20377405p20377405.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > [email protected] > http://openlayers.org/mailman/listinfo/users > > _______________________________________________ > Users mailing list > [email protected] > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://www.nabble.com/Pass-parameters-to-mapfile-tp20377405p20395213.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
