[mapserver-users] select one column values from a table
meenu
meenu.monu at gmail.com
Tue May 19 02:15:44 PDT 2009
hi friend...thanks for ur response...
let me desribe my requirement in detail...
i have one table n_123 and in that table i have 2 columns PLO_900,PLO_901.
PLO_900 PLO_900
af op_1
3f op_2
h7 op_3
i need the result like as follows
af
3f
h7
that means all the values from the first column....the specified code u
mentioned giving me only one record....can u help me ?
Paolo Corti wrote:
>
>
>
> meenu wrote:
>>
>> dears,in a mapserver website how can i retrve one column details from a
>> table....for eg in my map i have one table called n_123 ...in this table
>> i have one column named "PLO_900"...i need to retrive value like as
>> follows "select PLO_900 from n_123 "...i did the coding like as
>> follows...but it is giving me the table field names...can anybody help me
>> to solve this issue?
>>
>> Dim layer As layerObj = Util.MSMap.getLayerByName("n_123 ")
>> If layer IsNot Nothing Then
>> layer.open()
>> For i As Integer = 0 To layer.numitems - 1
>> Me.CmbS.Items.Add(layer.getItem(i))
>> Next
>> layer.close()
>>
>
> In c# this code is accessing a feature's values:
>
> String results = "";
> layerObj layer = map.getLayerByName("mylayer");
> layer.open();
> shapeObj shape=layer.getFeature(shapeInd, -1);
> //iterate fields and getting values
> for(int i=0; i<layer.numitems; i++)
> {
> results += "<BR>" + layer.getItem(i) + "=" + shape.getValue(i);
> }
> layer.close();
>
> let me know if it works for you
> best regards
>
> Paolo
>
>
>
>
>
-----
Meenu
--
View this message in context: http://n2.nabble.com/select-one-column-values-from-a-table-tp2931342p2938452.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
More information about the MapServer-users
mailing list