[Mapserver-users] QueryByAttribute

Norbert Thieme norbert.thieme@ilmenau.baw.de
Wed, 28 Apr 2004 11:19:41 +0200


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
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users