--=====================_14379924==_.ALT
Content-Type: text/plain; charset="us-ascii"
Exactly why I say to NOT use MAXROWS on the query, but use STARTROW and NUMROWS on the
CFOUTPUT QUERY=
At 08:19 AM 8/3/00 -0700, David Green wrote:
>I am new to SQL and CF but with this command how do I get the next 50
>records. 51 thru 100 display.
>
>> It's a lot quicker (and smoother) to use the SQL command TOP, i.e.;
>> select top 50 *
>> from myTable
>> where myField='#myValue#'
>
>Thanks for help
>David
>
>----- Original Message -----
>From: "Philip Arnold - ASP" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Thursday, August 03, 2000 7:25 AM
>Subject: RE: Paging query results
>
>
>> > No, I'm pretty sure that is incorrect.
>> > Using MAXROWS on the Query will limit the number of rows
>> > retrieved from the database, which will cut off the list of
>> > results. Queries do not have a STARTROW.
>> >
>> > To show a page at a time I must use STARTROW and MAXROWS on the
>> > <CFOUTPUT QUERY=xxx>
>>
>> CFQuery can't take StartRow, but does have MaxRows
>>
>> There is one flaw with this method though - the whole SQL query is parsed
>> and the number of rows is returned to CF which then only sends the
>template
>> the number the rows
>>
>> It's a lot quicker (and smoother) to use the SQL command TOP, i.e.;
>> select top 50 *
>> from myTable
>> where myField='#myValue#'
>>
>> One way I handle this is to have a list of IDs that I pass from page to
>> page, and then pass the start position, then build a smaller list of
>entries
>> from this list for the CFQuery
>>
>> This not only reduces the work the SQL has to do, but it also speeds up
>the
>> results to the template
>>
>> Philip Arnold
>> ASP Multimedia Limited
>> T: +44 (0)20 8680 1133
>>
>> "Websites for the real world"
>>
>> **********************************************************************
>> This email and any files transmitted with it are confidential and
>> intended solely for the use of the individual or entity to whom they
>> are addressed. If you have received this email in error please notify
>> the system manager.
>> **********************************************************************
>>
>>
>> --------------------------------------------------------------------------
>----
>> Archives: http://www.mail-archive.com/[email protected]/
>> To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in
>the body.
>
>------------------------------------------------------------------------------
>Archives: http://www.mail-archive.com/[email protected]/
>To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
>message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
---------------------------------------------------------------------------
Peter Theobald, Chief Technology Officer
LiquidStreaming http://www.liquidstreaming.com
[EMAIL PROTECTED]
Phone 1.212.545.1232 Fax 1.212.679.8032
--=====================_14379924==_.ALT
Content-Type: text/html; charset="us-ascii"
<html>
<font size=3>Exactly why I say to NOT use MAXROWS on the query, but use
STARTROW and NUMROWS on the CFOUTPUT QUERY=<br>
<br>
At 08:19 AM 8/3/00 -0700, David Green wrote:<br>
<blockquote type=cite cite>I am new to SQL and CF but with this command
how do I get the next 50<br>
records. 51 thru 100 display.<br>
<br>
> It's a lot quicker (and smoother) to use the SQL command TOP,
i.e.;<br>
> select top 50 *<br>
> from myTable<br>
> where myField='#myValue#'<br>
<br>
Thanks for help<br>
David<br>
<br>
----- Original Message -----<br>
From: "Philip Arnold - ASP" <[EMAIL PROTECTED]><br>
To: <[EMAIL PROTECTED]><br>
Sent: Thursday, August 03, 2000 7:25 AM<br>
Subject: RE: Paging query results<br>
<br>
<br>
> > No, I'm pretty sure that is incorrect.<br>
> > Using MAXROWS on the Query will limit the number of rows<br>
> > retrieved from the database, which will cut off the list
of<br>
> > results. Queries do not have a STARTROW.<br>
> ><br>
> > To show a page at a time I must use STARTROW and MAXROWS on
the<br>
> > <CFOUTPUT QUERY=xxx><br>
><br>
> CFQuery can't take StartRow, but does have MaxRows<br>
><br>
> There is one flaw with this method though - the whole SQL query is
parsed<br>
> and the number of rows is returned to CF which then only sends
the<br>
template<br>
> the number the rows<br>
><br>
> It's a lot quicker (and smoother) to use the SQL command TOP,
i.e.;<br>
> select top 50 *<br>
> from myTable<br>
> where myField='#myValue#'<br>
><br>
> One way I handle this is to have a list of IDs that I pass from page
to<br>
> page, and then pass the start position, then build a smaller list
of<br>
entries<br>
> from this list for the CFQuery<br>
><br>
> This not only reduces the work the SQL has to do, but it also speeds
up<br>
the<br>
> results to the template<br>
><br>
> Philip Arnold<br>
> ASP Multimedia Limited<br>
> T: +44 (0)20 8680 1133<br>
><br>
> "Websites for the real world"<br>
><br>
>
**********************************************************************<br>
> This email and any files transmitted with it are confidential
and<br>
> intended solely for the use of the individual or entity to whom
they<br>
> are addressed. If you have received this email in error please
notify<br>
> the system manager.<br>
>
**********************************************************************<br>
><br>
><br>
>
--------------------------------------------------------------------------<br>
----<br>
> Archives:
<a href="http://www.mail-archive.com/[email protected]/"
eudora="autourl">http://www.mail-archive.com/[email protected]/</a><br>
> To Unsubscribe visit<br>
<a href="http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk"
eudora="autourl">http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk</a>
or<br>
send a message to [EMAIL PROTECTED] with 'unsubscribe' in<br>
the body.<br>
<br>
------------------------------------------------------------------------------<br>
Archives: <a href="http://www.mail-archive.com/[email protected]/"
eudora="autourl">http://www.mail-archive.com/[email protected]/</a><br>
To Unsubscribe visit <a
href="http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk"
eudora="autourl">http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk</a>
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the
body. </font></blockquote><br>
<font size=2><b><br>
---------------------------------------------------------------------------<br>
Peter Theobald, </b>Chief Technology Officer<br>
</font><font size=3 color="#0000FF"><b>LiquidStreaming </b></font><a
href="http://www.liquidstreaming.com/" eudora="autourl"><font size=2
color="#0000FF"><u>http://www.liquidstreaming.com</a><br>
</u></font><font size=2>[EMAIL PROTECTED]<br>
<b>Phone</b> 1.212.545.1232 <b>Fax</b> 1.212.679.8032<br>
</font></html>
--=====================_14379924==_.ALT--
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.