Hi guys, I've found the following line:


<cfoutput query = "GetParks" StartRow = "#StartRow#" maxRows =
"#MaxRows#">


but if I use this line it means everytime a need to make a query it's
putting a strain on the database as it is getting all the rows then just
outputting say 10.  Is there a way in the SQL I can specify which record
to start from and where to end?


Cheers,


Stuart


-----Original Message-----
From: Stuart Kidd [mailto:[EMAIL PROTECTED]
Sent: 03 February 2004 09:58
To: CF-Talk
Subject: Get Records


Hi guys, can someone tell me the way I can specify how many records to
get, e.g. just the first 10 records?

<CFQUERY NAME="DisplayPropertyList" datasource="020">
SELECT
PropertyData.PropertyDataID, PropertyData.PropertyDataAgentReference,
PropertyData.PropertyDataFlatNumberHouseName,
PropertyData.PropertyDataStreetNumber,
PropertyData.PropertyDataStreetName,
PropertyData.PropertyDataPostcodeZip,
PropertyData.PropertyDataDateModified,
Count(PropertyEnquiry.PropertyEnquiryID) AS countEnquiries
FROM
PropertyData LEFT JOIN PropertyEnquiry ON PropertyData.PropertyDataID =
PropertyEnquiry.PropertyDataID
WHERE PropertyAgentID = #Client.PropertyAgentID#
GROUP BY PropertyData.PropertyDataID,
PropertyData.PropertyDataAgentReference,
PropertyData.PropertyDataFlatNumberHouseName,
PropertyData.PropertyDataStreetNumber,
PropertyData.PropertyDataStreetName,
PropertyData.PropertyDataPostcodeZip,
PropertyData.PropertyDataDateModified
ORDER BY #URL.SortBy#                 
</CFQUERY>

Cheers,

Stuart

Ps: (I am going to start sticking in cfqueryparam tags, just working on
them!)
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to