Closing single CF tags like XML/XHTML

2006-10-27 Thread Jeff Guillaume
Can anybody direct me to an official statement of sorts recommending that CF developers start closing single tags like cfabort/ with an ending slash a la XML (like I just did? I've been doing it for a long while now, and I can't remember when support was first added (MX 6?) but I seem to

Re: Closing single CF tags like XML/XHTML

2006-10-27 Thread Jeff Guillaume
Christian Cantrell posted a survey about this in 2003... http://weblogs.macromedia.com/cantrell/archives/2003/05/closing_tags_wi.cfm I especially liked Samuel Neff's comments, as they echo my own beliefs (since we're all supposed to be coding in XHTML - or will eventually - which requires

Re: Closing single CF tags like XML/XHTML

2006-10-27 Thread Jeff Guillaume
Aha! I knew I read it somewhere semi-official (although I admit these are just suggestions): http://livedocs.macromedia.com/wtg/public/coding_standards/style.html Macromedia's own coding standards guide: [snip] ColdFusion source code cannot quite be written to be purely XHTML-compliant

Re: Manually flush all cached queries?

2006-09-07 Thread Jeff Guillaume
Thank you, Raymond. (I just posted my self-followup coming to the same conclusion before your response came in.) Clearing all of the queries is exactly what I wanted to do, so problem solved. cfobjectcache action=refresh will clear ALL of them. To clear one query, rerun the query with the

Re: Manually flush all cached queries?

2006-09-07 Thread Jeff Guillaume
Self-followup: I researched a bit and came up with cfobjectcache action=clear/. It seems to do the trick, although I've just read elsewhere that it may not clear all queries. However, some is better than none for my purposes and it worked in my test just now. Anyone used it before? I had

Manually flush all cached queries?

2006-09-07 Thread Jeff Guillaume
I fear I already know the answer to this, but is it possible? We use cachedwithin queries all over the place and want to be able to flush CF's memory when needed to reflect changes from the database immediately. Is there any way to do this other than restarting the CF service? I know you can

Re: What is the use of structFind? (CFMX)

2006-08-24 Thread Jeff Guillaume
I haven't used StructFind in a while, but one use might be if you're storing the name of the field you want to access in a variable: structFind(xStruct, variableWithFieldNameInIt); Although this ... xStruct['#variableWithFieldNameInIt#'] . works too, so I dunno. I'd bet my left leg that

Re: Messy messy messy code

2006-08-24 Thread Jeff Guillaume
job! --- Jeff Guillaume Kazoomis Online Media http://www.kazoomis.com ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four

Re: Top 100 ColdFusion Programmers

2006-08-24 Thread Jeff Guillaume
more in-depth coding. There are others, to be sure, but these guidelines have helped us rather quickly weed out the undesirables. --- Jeff Guillaume Kazoomis Online Media http://www.kazoomis.com ~| Introducing the Fusion

Re: coldfusion sql injection

2006-08-23 Thread Jeff Guillaume
Let alone the security aspect, it also improves performance by causing your database server to bind the variables before executing the query. Straight from Macromedia: http://tinyurl.com/oo49m (link to docs) - Allows the use of SQL bind parameters, which improves performance. - Ensures that

Re: Problem with URL display in browser

2006-08-23 Thread Jeff Guillaume
. At the very least, you should have keyword and description columns in your DB for every article. --- Jeff Guillaume Kazoomis Online Media http://www.kazoomis.com One of the columns in my table is called 'shortheader', which basically takes the article headline, and makes it url friendly. Therefore

Re: Session issues

2006-08-23 Thread Jeff Guillaume
Let's see your isUserAuthenticated function. (Also, you don't need to use YesNoFormat... your function should just return a type of boolean.) cfscript if(YesNoFormat(Application.Security.isUserAuthenticated()) EQ No AND trim(attributes.fuseaction) EQ personalinfo){

Re: Session issues

2006-08-23 Thread Jeff Guillaume
Your framework looks good to me. If this problem just popped up out of nowhere, and you didn't make any code changes, you should probably check if there were any server configuration changes in CF Admin or IIS. ~| Introducing

Re: Session issues

2006-08-23 Thread Jeff Guillaume
Your framework looks good to me. If this problem just popped up out of nowhere, and you didn't make any code changes, you should probably check if there were any server configuration changes in CF Admin or IIS. ~| Introducing

Re: Sorting by Column Headers

2006-08-23 Thread Jeff Guillaume
The quickest fix would be to pass your search parameters on the URL instead of FORM (action=get instead of action=post from the submitting page). Then grab the current URL, minus the sort parameter, to re-use for the next output. cfset theUrl = cgi.script_name ? left(cgi.query_string,

Re: Sorting by Column Headers

2006-08-23 Thread Jeff Guillaume
Storing the results in SESSION is a nifty (and fast) method, but I'd only recommend it if you know your result sets will always be relatively small. You don't want 100 people caching a resultset of, say, 10,000 rows of data. You'll run into memory issues.

Re: Trying to query top selling products

2006-08-23 Thread Jeff Guillaume
Here's some SQL for MS SQL Server (you're not using Access are you?): select top 10 prodName, sum(prodQty) as totalOrdered from tblOrderItems group by prodName order by 2 desc ~| Introducing the Fusion Authority Quarterly

Re: coldfusion sql injection

2006-08-22 Thread Jeff Guillaume
I just make sure I always scrub user-entered data when possible, but at the very least you should use cfqueryparam to pass data into queries. --- Jeff Guillaume Kazoomis www.kazoomis.com Now, it is my belief that CF auto escapes single quotes, so sql injection into a string is not possible. I