chapter31

development in a land far far away…

at the moment

History is not what happened. History is what was written down.

Archive for the 'ColdFusion' Category

INSERT or UPDATE in one statement with MySQL

Wednesday, April 23rd, 2008

A little while ago I mentioned combining multiple INSERT statements with MySQL, here is another helpful approach to a common problem.
In many systems you will give the user a chance to ADD and EDIT a record, a News post for example. As usual there are many ways to handle writing any changes to the database, […]

Read the rest of this entry »

Workaround for cfscript bug in varscoper

Tuesday, April 8th, 2008

Those that use the sensational varscoper tool from Mike Schierberl know that cfscript is still a little experimental with the current release.
One of the things it can do is return variables that are actually “var” scoped as not var scoped when using cfscript. This seems to happen most often when you have a comment directly […]

Read the rest of this entry »

Flushing a cached web service

Monday, April 7th, 2008

When you use WebServices with ColdFusion, the WSDL ’stub’ is cached in CF Administrator (presumably for performance reasons).
This can be a pain when you need to change the WSDL and you don’t have access to CF Admin to flush the service which is the scenario I found myself in today.
Luckily for me I sit near […]

Read the rest of this entry »

As all developers know, one of the most common bottlenecks in a web application is the database. Database optimisation is therefore a huge part of building a streamlined application capable of handling more concurrent users.
Often you might have the need to perform multiple INSERT’s against a database from a single user form submission.
Let’s say you […]

Read the rest of this entry »

Most developers know that if you reference a variable without a scope prefix (such as variables, form, URL etc) ColdFusion will check each of the available scopes until it finds a variable of the name you are looking for.
The order in which ColdFusion checks is:

Function local (UDFs and CFCs only)
Thread local (inside threads only)
Arguments
Variables (local […]

Read the rest of this entry »