James, your code will always pull the top 250 records. This will not work for record paging.
Daniel -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of James Blaylock Sent: Wednesday, September 07, 2005 3:17 PM To: [email protected] Subject: Re: sql limit Hi Kevin, I may be doing something similar to what you need, if not just delete this. Here is my sql: <CFQUERY DATASOURCE="SomeItems" NAME="items"> SELECT Top 250 Item_ID, Description FROM Items Where ID > 11875 and Description Not Like '' ORDER BY ID </CFQUERY> Yes, limiting the number of records will be much faster in the query than in the cfoutput. There are also thousands of records in the database that I pull from and by pulling them 250 at a time, it becomes very manageable. Sincerely, James --- Kevin Fricke <[EMAIL PROTECTED]> wrote: > First of all, I assume that limiting the number of > records will be much > faster in the query than in the cfoutput, correct? > If you do the 'ol > startRow and endRow, isn't it pulling all of the > records anyway. > > Second, if this is the case, what is the best way to > handle the next, > previous, etc. I ask because the table that I am > pulling from has hundreds > of thousands of records and I only want 250 at a > time. > > > Thanks, > > Kevin > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ---------------------------------------------------------- To post, send email to [email protected] To unsubscribe: http://www.dfwcfug.org/form_MemberUnsubscribe.cfm To subscribe: http://www.dfwcfug.org/form_MemberRegistration.cfm ---------------------------------------------------------- To post, send email to [email protected] To unsubscribe: http://www.dfwcfug.org/form_MemberUnsubscribe.cfm To subscribe: http://www.dfwcfug.org/form_MemberRegistration.cfm
