Advertisement
sqlninja1

Untitled

Feb 15th, 2015
511
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!--- OLDER SQL THAT USED TO WORK--->
  2.         <cfif structkeyExists(url,'event_date')>
  3.                 <cfquery name="get_comp_details" dataSource="db9">
  4.                     SELECT nCompetitor as competitor_name, nScore as score, nDate
  5.                     FROM nDataAll
  6.                         WHERE nDate = <cfqueryparam cfsqltype="cf_sql_date" value="#event_date#" />
  7.                     ORDER BY nScore DESC
  8.                     -- LIMIT 27
  9.                 </cfquery>
  10.             </cfif>
  11.  
  12. <!--- Trying to convert it so it can be used in queries of queries---->
  13. <cfset getEventRslts = new Query (
  14.      sql = "Select * From nDataAll WHERE nDate = <cfqueryparam cfsqltype="cf_sql_date" value="#event_date#" />",
  15.       datasource = "db9"
  16.      ) />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement