chapter31

development in a land far far away…

at the moment

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

Archive for March, 2008

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 »

Installing PHP5 with MySQL extensions

Monday, March 24th, 2008

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

Read the rest of this entry »

Update for Java 6

Saturday, March 22nd, 2008

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!

Read the rest of this entry »

Random database results with ColdFusion

Friday, March 21st, 2008

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

Read the rest of this entry »

Returning random results with MySQL

Friday, March 21st, 2008

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

Read the rest of this entry »