Retrieve Last Record Inserted – Coldfusion
This post highlights an old method to retrieve last record. Coldfusion has changed a lot since then. Keep searching.
If you are a developer, there is no doubt that you have the need to retrieve the last record of a database insert without requiring another input from the end user. You want your user experience to appear as fluid as possible and an unnecessary multiple page submit does not accomplish that.
If you have a record that you will be inserting and need the ID of that just inserted record, your code will depend upon the database that you use. I will cover two of the most common DB’s used, MSSQL and MySQL.
Retrieve last record inserted (ID) if using Microsoft SQL Server (MSSQL):
I won’t go deep into the how and why, what I am looking to do is provide a basis for you to get over this little stumbling block. When using MSSQL, you can accomplish the task within your record insert query. I am assuming that you know the basics about inserting data using CF Query. I am also using <cfqueryparam> to protect my queries from hacks and to require particular datatypes. This has nothing to do with the key retrieval, it is just good practice.
Google Shutting down Radio Ads
Google jumped into the radio ad market with a small amount of fanfare back in 2006. If you were someone who gave their radio ads a shot, I would bet that you might have had the same experience. Terrible audience. Well, the radio ad experiment is shutting down.
Radio advertising is like real estate. Location, location, location. If you aren’t tapping into the heart of a market, you aren’t going to provide a good product to the end user. In my market (Buffalo NY) the station mix was very poor. Fringe stations to say the least. Some test campaigns were virtually useless. Advertisers can continue using Google Audio Ads until May 31st.
Google is getting back to its roots and focusing on what comes from that. They are retreating certain fronts (selling radio ads and selling newspaper ads) and continuing to build on search and Adwords and the audience that it brings.
They need to focus on their core for the coming battle in the OS/desktop space.
Eyetracking Studies and Page Design
When consulting on site layouts and page layouts there is often a balancing act with regard to what a site owner wants to see and what will give the opportunity for the highest level of success. Users of the web have become conditioned on where to focus and what to expect. If you don’t deliver what they expect within a short period of time, your user will become detached and bounce.
There are many site owners/designers who will use a beautiful looking layout from one of the many template sites (boxedart.com, templatemonster.com, etc.). Though many of these designs are beautiful, many are designed to be visually appealing and don’t take usability into account. There are many template designs with tall header graphics that don’t allow much more than a couple of inches at the bottom of the screen for your valuable content and or navigation.

There are also factors to consider such as ad blindness. If you design your page in a way that your call to action(s) resemble advertising, your message will be lost. Combine that with a huge header garphic and your visitor is gone before considering your message, service, or product.
The Gateway website (below) is a great example of ad blindness. Take a look at the hot spots in this heat map (the hot spots are the focus points of the users’ eyes). The red arrow demonstrates the lack of focus that was paid toward the ‘featured item’. The designer may have felt that this would become a focus, however, the exact opposite took place. Ad blindness kept this feature from gaining any attention.

When designing a site/page, be sure to take usability into account. Don’t let your featured items be misconstrued as advertising and subject to blindness. Consider writing styles that will provide users with snippets of information. There is a particular method for writing on the web. Short paragraphs, bulleted lists, interjected images, etc. You need to provide your message to your user in short order or your user will be gone. All of the marketing efforts to deliver that visitor are lost if your page cannot convert.

