Hi Alan,<br><br>please change to query to a combination like this,<br><br>select count(*) from Contacts; this will get you the number of contacts.<br><br>then run query select * from Contacts m,100 while m is less then number of contacts.<br>

<br><br>hope this helps with your issue.<br><br>Thanks,<br>MAK<br><br><div class="gmail_quote">On Thu, Nov 19, 2009 at 2:14 PM, Alan Lord (News) <span dir="ltr">&lt;<a href="mailto:alanslists@gmail.com">alanslists@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi all,<br>
<br>
I&#39;ve been hacking away at the vtiger extension and I have had had some<br>
success.<br>
<br>
Using my modified extension running in the pre-release of TB 3, I can<br>
now add emails to vtiger and import Contacts into an existing address book.<br>
<br>
Whilst I am at this stage though, I want to try and fix a bug that is<br>
causing one of customers a problem.<br>
<br>
This line of code in the extension:<br>
<br>
client.query(&quot;select * from Contacts;&quot;,<br>
<br>
gets all contacts for a user.<br>
<br>
At the vtiger end of this connection there is a LIMIT clause which just<br>
stops returning records at 100. (See this forum thread for details<br>
<a href="http://forums.vtiger.com/viewtopic.php?t=28076&amp;highlight=limit+100" target="_blank">http://forums.vtiger.com/viewtopic.php?t=28076&amp;highlight=limit+100</a>).<br>
<br>
Increasing this value works until you hit the limit of the webserver for<br>
the length of the URL, it seems that around 500 records and you will get<br>
a 414 Error. My customer has nearly 1000 records.<br>
<br>
What I would like to do is to use something like this:<br>
<br>
<a href="http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_found-rows" target="_blank">http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_found-rows</a><br>
<br>
to get the number of rows that *would* be returned and then be able to<br>
iterate through manageable chunks of returned data.<br>
<br>
&quot;SQL_CALC_FOUND_ROWS and FOUND_ROWS() can be useful in situations when<br>
you want to restrict the number of rows that a query returns, but also<br>
determine the number of rows in the full result set without running the<br>
query again. An example is a Web script that presents a paged display<br>
containing links to the pages that show other sections of a search<br>
result. Using FOUND_ROWS() allows you to determine how many other pages<br>
are needed for the rest of the result. &quot;<br>
<br>
I guess my question is can I just pass this request straight through to<br>
the DB or does there need to be any wrapping done in vtiger.<br>
<br>
Secondly, I think this is a feature of MySQL 5.0 and onwards. Is this<br>
going to be a problem?<br>
<br>
TIA<br>
<br>
Alan<br>
<br>
_______________________________________________<br>
Reach hundreds of potential candidates - <a href="http://jobs.vtiger.com" target="_blank">http://jobs.vtiger.com</a><br>
</blockquote></div><br>