this is definitely the wrong list for this question, you should be  
asking on mapserver-users or even the postgis list.

In any case, the correct way to specify a sub-select for postgis is:

DATA "the_geom from (select * from my_table WHERE name like 'abc') as  
foo using unique gid using srid=-1"

Things to note:

your sub-select must return the_geom, gid and any other attributes  
that you are using elsewhere (for labelitem, classitem, etc).

gid might be called something else, it just needs to be a unique value  
such as the primary key of your table.

Cheers

Paul

On 28-Jun-08, at 7:14 AM, Reena Singh wrote:

> I want to use query in the map file like ........
>
> DATA "the_geom FROM my_table WHERE name like 'abc' "
>
> but this is not working accr to the format.
>
> Can ne1 hlp?
>
> --
> Be Yourself @ mail.com!
> Choose From 200+ Email Addresses
> Get a Free Account at www.mail.com!
> _______________________________________________
> Users mailing list
> [email protected]
> http://openlayers.org/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to