Created
February 19, 2014 19:10
-
-
Save bdw429s/9099324 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfset getMaxResults = 200> | |
<cftimer type="inline" label="cfquery"> | |
<cfquery name="testSQL" datasource="contentBox"> | |
select top #getMaxResults# | |
this_.commentID as commentID16_0_, | |
this_.content as content16_0_, | |
this_.author as author16_0_, | |
this_.authorIP as authorIP16_0_, | |
this_.authorEmail as authorEm5_16_0_, | |
this_.authorURL as authorURL16_0_, | |
this_.createdDate as createdD7_16_0_, | |
this_.isApproved as isApproved16_0_, | |
this_.FK_contentID as FK9_16_0_ | |
from cb_comment this_ where this_.isApproved=1 | |
order by this_.createdDate desc | |
</cfquery> | |
</cftimer> | |
<p></p> | |
<cftimer type="inline" label="ORMExecuteQuery"> | |
<cfset commentResults = ORMExecuteQuery(' | |
from cbComment where isApproved=1 | |
order by createdDate desc', | |
false, {maxresults = getMaxResults} )> | |
</cftimer> | |
<p></p> | |
<cfset commentService = getModel("commentService@cb")> | |
<cftimer type="inline" label="criteria"> | |
<cfset commentResults = commentService.findApprovedComments( max = getMaxResults)> | |
</cftimer> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment