I had a small clarification regarding this piece of code.
consider an exmaple like this
<sql max=500 skip=0 "select xyz from abc where a=b">
<if $loop lt 10>
do some processing
<else>
do absolutely nothin
</if>
</sql>
results found is : $loop + 1
I queried the texis and got a count for the records returned from the above query. It was 17500 approx.
Now since i do max=500, the above code shd do some processing for 10 records and for remanining 490 records it shd do nothing. $loop shd be 499 in the end.
But $loop is being returned as 20. Why is the loop stopping after 20 results.
What i am tending to do is doing the count manually instead of using count query, since count query is taking too much time to run as there are many clauses in the where condition. Can you please help me explain the above case which i have mentioned.
consider an exmaple like this
<sql max=500 skip=0 "select xyz from abc where a=b">
<if $loop lt 10>
do some processing
<else>
do absolutely nothin
</if>
</sql>
results found is : $loop + 1
I queried the texis and got a count for the records returned from the above query. It was 17500 approx.
Now since i do max=500, the above code shd do some processing for 10 records and for remanining 490 records it shd do nothing. $loop shd be 499 in the end.
But $loop is being returned as 20. Why is the loop stopping after 20 results.
What i am tending to do is doing the count manually instead of using count query, since count query is taking too much time to run as there are many clauses in the where condition. Can you please help me explain the above case which i have mentioned.