[Mapserver-users] QueryByAttribute

Norbert Thieme norbert.thieme at ilmenau.baw.de
Wed Apr 28 05:19:41 EDT 2004


Hi,

Don't you get an error message if you launch queryByAttributes. If you 
don't use the @ before there should be a message if an error occurs. If 
not there must be something wrong in the script.

I think you didn't copy/paste the code? Sorry for the question because I 
think php would in the other case report an error on the line with:

    if ( $oQueryStatus = MS_FAILURE )

because "==" instead of "=".

I don't know if this helps you but here is a snippet from the code I 
use. Even if I use queryByPoint you can try to use your 
queryByAttributes the same way:

if (@$layer->queryByPoint($q_point, $q_mode, 0) == MS_SUCCESS)
{
   $res_count = $layer->getnumresults();
   for ($i=0; $i < $res_count; $i++)
   {
     $result = $layer->getResult($i);
     ....
   }
}

I don't know if this solves the problem but I hope it will help you.

Regards,
Norbert



More information about the mapserver-users mailing list