<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-2">


<META content="MSHTML 6.00.2800.1543" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=853110717-19042006>Can someone point me 
how to do eficiently querybyattributes on mysql layers using 
php/mapscript?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=853110717-19042006></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=853110717-19042006>The layer has 
over&nbsp;1 000 000 records (I don't want to split it unless...)&nbsp;can be 
displayed and queried by point when clicking on map, those things work fast but 
when it comes to querybyattributes I get error message:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=853110717-19042006>"Execution time of 
30 seconds exceded"</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=853110717-19042006></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=853110717-19042006>I know that i can 
set execution time to 'no limit' but it's no use since&nbsp;user will has to 
wait that long&nbsp;for each query results.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=853110717-19042006></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=853110717-19042006>Please 
help!</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=853110717-19042006></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=853110717-19042006>this is my map file 
with this problematic layer:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=853110717-19042006>LAYER<BR>&nbsp;&nbsp;&nbsp;&nbsp; GROUP 
searchableH<BR>&nbsp;&nbsp;&nbsp;&nbsp; NAME 
address<BR>&nbsp;METADATA<BR>&nbsp;&nbsp;"DESCRIPTION" 
"address"<BR>&nbsp;&nbsp;"RESULT_FIELDS" 
"ADDRESS"<BR>&nbsp;END<BR>&nbsp;&nbsp;&nbsp;&nbsp; TYPE 
POINT<BR>&nbsp;&nbsp;&nbsp;&nbsp; CONNECTIONTYPE OGR<BR>&nbsp;&nbsp;&nbsp;&nbsp; 
CONNECTION "vdf/address.ovf"<BR>&nbsp;DATA "address"<BR>&nbsp;&nbsp;&nbsp;&nbsp; 
STATUS 
ON<BR>&nbsp;PROJECTION<BR>&nbsp;&nbsp;"init=epsg:4326"&nbsp;#lon/latwgs84<BR>&nbsp;END<BR>&nbsp;&nbsp;&nbsp;&nbsp; 
TEMPLATE "address.html"<BR>&nbsp;&nbsp;&nbsp;&nbsp; 
CLASS<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME 
"address"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
STYLE<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYMBOL 
'C:\Inetpub\wwwroot\mapserver\test\etc\pkp.gif'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
END<BR>&nbsp;&nbsp;&nbsp;&nbsp; END<BR>END</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=853110717-19042006></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=853110717-19042006>and piece of php 
code that does the query:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=853110717-19042006></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=853110717-19042006>$qLayer = 
$gpoMap-&gt;GetLayerByName($HTTP_FORM_VARS["SearchedLayer"]);<BR>$qFiled = 
$HTTP_FORM_VARS["SearchedField"];<BR>$qValue = 
strtoupper($HTTP_FORM_VARS["SearchedValue"]);&nbsp;</SPAN></FONT></DIV><FONT><SPAN 
class=853110717-19042006>
<DIV><BR><FONT face=Arial 
size=2>&nbsp;&nbsp;$qLayer-&gt;queryByAttributes($qFiled, $qValue, 
MS_MULTIPLE);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV></SPAN></FONT><SPAN class=853110717-19042006><FONT face=Arial size=2>what 
can be wrong???</FONT></SPAN></DIV>
<DIV><SPAN class=853110717-19042006><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=853110717-19042006><FONT face=Arial size=2>Best 
Regards</FONT></SPAN></DIV>
<P><FONT face="Arial CE" size=2>Artur </FONT></P><pre>*************************************************************************
The information contained in this communication is confidential, is
intended only for the use of the recipient named above, and may be
legally privileged.

If the reader of this message is not the intended recipient, you are 
hereby notified that any dissemination, distribution or copying of this
communication is strictly prohibited.

If you have received this communication in error, please resend this
communication to the sender and delete the original message or any copy
of it from your computer system.

Thank you.
*************************************************************************
</pre></BODY></HTML>