Hi Ian,
 
It's a long shot, but have you checked whether your attribute names (not
just the values) are in upper/lowercase? Because attribute names are
case sensitive.
What does your php log say? Because if you do a search, and it does not
find matching values (as opposed to something else being wrong), it will
report a warning in your php log. If this is what it says, then you will
at least have narrowed it down. But it may give a different error. You
must configure php to display warnings, though.
 
regards,
 
Jacob
 
 


________________________________

        From: UMN MapServer Users List
[mailto:[EMAIL PROTECTED] On Behalf Of Ian Tidy
        Sent: 9 January 2008 08:11
        To: MAPSERVER-USERS@LISTS.UMN.EDU
        Subject: [UMN_MAPSERVER-USERS] PHP MapScript queryByAttributes
Issue
        
        

        Hi All, 

        I am running MapServer 4.10 and am having a problem with a
query. 

        My query code is: 
                $qstring = "/^$street.*/"; 
                $oLayer = $map->getlayerbyname("smartworx"); 
                $oLayer->set("status", MS_ON); 
                @$oLayer->queryByAttributes('STNAME', $qstring,
MS_MULTIPLE); 

        And this fails, but when I run the same code using a different
table it works: 
                $qstring = "/^$street.*/"; 
                $oLayer = $map->getlayerbyname("crs_road_centreline"); 
                $oLayer->set("status", MS_ON); 
                @$oLayer->queryByAttributes('ROAD_LABEL', $qstring,
MS_MULTIPLE); 

        Now I know the obvious answer is that the item I am searching
for doesn't exist in my table, but I have checked and it does exist.
The only difference between the two (2) shape files is that
crs_road_centreline is a LINE table and smartworx is a POINT table and
have slightly different structures.

        crs_road_centreline is the road centreline network 
        smartworx is a address point file. 

        Any Ideas??? 

        Cheers Ian 
        ______________________
        Ian Tidy
        GIS Analyst / Developer
        Works Asset Department
        Napier City Council
        Hastings St, Private Bag 6010, Napier, New Zealand
        Phone +64-6-835-7579 Ext. 8115
        Fax +64-6-834-4195
        mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
        http://www.napier.govt.nz <http://www.napier.govt.nz>  |
http://maps.napier.govt.nz <http://maps.napier.govt.nz>  



________________________________

        This e-mail message has been scanned for Viruses and Content and
cleared by MailMarshal 
________________________________

        
######################################################################
        Attention: 
        This e-mail message and accompanying data may contain
information that
        is confidential and subject to legal privilege. Any information
        provided is given in good faith. However unless specifically
stated to
        the contrary, Napier City Council accepts no liability for the
        content of this e-mail or for the consequences of any action
taken on
        the basis of the information provided, unless that information
is
        subsequently confirmed in writing. If you are not the intended
recipient,
        you are notified that any use, dissemination, distribution or
copying
        of this message or data is prohibited. If you received this
e-mail
        message in error, please notify us immediately and erase all
copies
        of this message and attachments. Thank you. 


This email and any attachments are intended solely for the named recipient and 
are confidential. The copying or distribution of them or any information they 
contain by anyone other than the named recipient is prohibited. If you have 
received this document in error, please notify the sender and delete all copies 
from your computer system and destroy all hard copies. It is the recipient's 
responsibility to check this email and any attachments to this email for 
viruses before use.

Reply via email to