Brad Wood wrote:
> I think your problem may stem from the old behavior of ColdFusion query
> columns guessing what type they are based on values in the first several
> rows.
Ugly because of line breaks, but here ya go:
<!---First, we create the query object, q_atty:--->
<cfset q_atty = queryNew("atty_id, first_name, middle_name, last_name,
suffix, atty_type, bus_number, office_id, keyCOUNT")>
<!---Looping over array elements, we get, for each item, text inside
elements title, description and link.--->
<cfset n = #results.recordcount# >
<cfloop query="results" startrow="1" endrow="#n#">
<!--- Count the occurrences of the search term in the narrative
and keyword columns --->
<cfset req.narrCOUNT =
ListValueCountNoCase(results.narrative,#req.srch#,' ')>
<cfset req.wordCOUNT =
ListValueCountNoCase(results.keywords,#req.srch#,' ')>
<cfset req.keyCOUNT = int(#req.narrCOUNT#+#req.wordCOUNT#)>
<cfset queryAddRow(q_atty)>
<cfset querySetCell(q_atty, "atty_id", results.atty_id,
results.currentROW)>
<cfset querySetCell(q_atty, "first_name", results.first_name,
results.currentROW)>
<cfset querySetCell(q_atty, "middle_name", results.middle_name,
results.currentROW)>
<cfset querySetCell(q_atty, "last_name", results.last_name,
results.currentROW)>
<cfset querySetCell(q_atty, "suffix", results.suffix,
results.currentROW)>
<cfset querySetCell(q_atty, "atty_type", results.atty_type,
results.currentROW)>
<cfset querySetCell(q_atty, "bus_number", results.bus_number,
results.currentROW)>
<cfset querySetCell(q_atty, "office_id", results.office_id,
results.currentROW)>
<cfset querySetCell(q_atty, "keycount", req.keyCOUNT,
results.currentROW)>
</cfloop>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307988
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4