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
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
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
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
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
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
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
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
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
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
. 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
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){
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
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
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,
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.
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
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
18 matches
Mail list logo