Cold Fusion query for certain data. Not all data.

I have an events table that outputs to a scheduler. I have 800 records in my events table and when I open my scheduler all 800 records populate the calendar.

The problem is I only need certain records.

Like I want all records where the section_id =1653

Where do I put the query to get only certain records

Here is the query but where do I put it (what pages(s))

SELECT * FROM events WHERE section_id =1665

When I put it on the config.cfm file like this

<cfset scheduler.render_sql(“SELECT * FROM events WHERE section_id =1665”)>

I get NO results.

How do I do this?

Hi
render_sql function requires some extra parameters.
You have to define ID as a second argument, anmd the list of fields as third argument. Also pay attention in the order of fields - dates should be first, then name. All the rest fields are optional.

For example:
<cfset scheduler.render_sql(“SELECT * FROM events WHERE section_id =1665”,“event_id”,“start_date,end_date,event_name,details”)>

Thank you. That was it!