Monthly Archives: March 2008

March 28, 2008
Evaluating (ColdFusion) unscoped query variables

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 [...]

March 24, 2008
Installing PHP5 with MySQL extensions

I’m generally a ColdFusion programmer but occasionally I need to install PHP for one reason or another, the last couple of times has been to use Wordpress.
I remember the last time I did this (maybe 6 months ago) I had problems with connecting to MySQL because PHP 5 no longer bundles MySQL client libraries for [...]

March 22, 2008
Update for Java 6

Sun have just released Java 6 update 5, looking at the release notes it doesn’t look as though the CFC issues for ColdFusion have been addressed yet, we can only hope though!

March 21, 2008
Random database results with ColdFusion

Today I was looking at returning random records purely from MySQL but was limited with large tables in getting all random results (not just a random starting seed).
I tried a ColdFusion solution instead.
First get all the primary keys from the table in question and create an array of the values (this works for numeric [...]

March 21, 2008
Returning random results with MySQL

Selecting random query results is something we often need to do, whether it be a single row or a small record set. You may want to display a random list of “tips” or “facts”, a random “user” or “related product” etc.
The simplest and most common solution you find uses the MySQL rand() function (which can [...]