<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>i_am_geek&#039;s blog</title>
	<atom:link href="http://i-am-geek.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://i-am-geek.com/blog</link>
	<description>do work son</description>
	<lastBuildDate>Thu, 15 Sep 2011 14:56:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>How I Got Started in ColdFusion</title>
		<link>http://i-am-geek.com/blog/?p=194</link>
		<comments>http://i-am-geek.com/blog/?p=194#comments</comments>
		<pubDate>Mon, 01 Aug 2011 16:09:01 +0000</pubDate>
		<dc:creator>i_am_geek</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://i-am-geek.com/blog/?p=194</guid>
		<description><![CDATA[In reply to this post , here is how I got started in ColdFusion: I first got started in ColdFusion at my first full time web position. I created a craigslist post basically saying I would work any company that would have me (lol) and sure enough, 1 month later I was working as a [...]]]></description>
			<content:encoded><![CDATA[<p>In reply to this <a href="http://www.bryantwebconsulting.com/blog/index.cfm/2011/7/20/August-1-2011-is-How-I-Started-ColdFusion-Day">post</a> , here is how I got started in ColdFusion: </p>
<p>I first got started in ColdFusion at my first full time web position.  I created a craigslist post basically saying I would work any company that would have me (lol) and sure enough, 1 month later I was working as a web developer.  When I started my boss told me that they used ColdFusion and I would have to learn it.  Previous to this I had some limited PHP knowledge but no real development chops&#8230;that changed real quick.  Soon after learning the basic structure of the language, I was handling my own projects and really learning all that ColdFusion had to offer.  </p>
<p>We offered a CMS that could be customized based off the customers site/requirements and this really helped me learn how to read existing code and learn to update it. The most common task we did was generating reports, so I became very familiar with exporting pdf&#8217;s and excel documents on the fly.  </p>
<p>Fast forward 3 years and I have become the developer I am today.  I run a successful web development business specializing in rapid development using ColdFusion.  I have created my own custom CMS that I implement on most of my sites and with the new features available in ColdFusion 9, this really has become a great piece of software.  I owe a lot to ColdFusion and any chance that I get, I tell people about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://i-am-geek.com/blog/?feed=rss2&#038;p=194</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FullSail Repost</title>
		<link>http://i-am-geek.com/blog/?p=190</link>
		<comments>http://i-am-geek.com/blog/?p=190#comments</comments>
		<pubDate>Tue, 07 Jun 2011 13:41:57 +0000</pubDate>
		<dc:creator>i_am_geek</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rant]]></category>
		<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[FullSail]]></category>

		<guid isPermaLink="false">http://i-am-geek.com/blog/?p=190</guid>
		<description><![CDATA[As part of my online classes, we participate in weekly discussions on various topics. This weeks was about: 1. The difference between a server-side language (such as CFML), a server-side platform (such as Adobe ColdFusion Server), and a server-side development framework (such as CFWheels). 2. The inherent statelessness of server-side applications, and how some platforms [...]]]></description>
			<content:encoded><![CDATA[<p>As part of my online classes, we participate in weekly discussions on various topics.  This weeks was about:</p>
<p>1. The difference between a server-side language (such as CFML), a server-side platform (such as Adobe ColdFusion Server), and a server-side development framework (such as CFWheels).<br />
2. The inherent statelessness of server-side applications, and how some platforms work around this statelessness using tricks such as Sessions.<br />
3. The pros and cons of at least two server-side platforms or languages.</p>
<p>I got a lot of nice remarks on my post, so I figured I would share it:</p>
<blockquote><p>There are many differences between a server-side language, like ColdFusion, a server-side platform, like Adobe ColdFusion Server and a server-side framework, like CfWheels.  The server-side language is the language the server processes and what you will be using when creating your pages.  Server-side languages need a server to process the language and that is what is called the server-side platform.  When you use the server-side language of ColdFusion, your server-side platform will be Adobe&#8217;s ColdFusion Server.  This is what you install on your web server to run your pages.  Most languages have what are called Frameworks.  What these essentially are is a group of pages that someone else created, that you can use in your source to make things easier.  Certain things are already done for you and you essentially just have to plug in your data and the framework displays/updates the data with prewritten code.  </p>
<p><begin biasedcoldfusionrant></p>
<p>I have used Coldfusion (version 5-9) for the past 4 years and couldn&#8217;t be happier.  The rapid development times alone should be reason enough to check this language out.  With a huge library of tags built into the language, you can create the code to do many advanced functions in just a few lines.  Now the main complaint the ColdFusion community (which is huge, helpful and always growing) hears from the PHP Community is the price of ColdFusion.  Now the server costs are more than what people are expecting to pay, which is $0 but you have to think of that initial cost as an investment in the language.  There are many posts proving this (<a href="http://java.dzone.com/news/dear-coldfusion-skeptic">Link</a> &#8211; which shows even more great reasons to use ColdFusion) and as you will see, the time you save learning the language, developing the app, and then the time saved on maintenance and support, shows that ColdFusion is actually the cheapest language to use based on that criteria.  Also, not to forget but there is a <a href="http://www.getrailo.org">FREE, OPEN SOURCE</a> version of ColdFusion used all over the web called Railo.  The only difference between Railo and the Adobe version are a few tags but Railo is constantly improving the language and new tags are added all the time.</p>
<p></end biasedcoldfusionrant></p>
<p>Now to be fair, I have used PHP in the past and actually wrote a few websites with it back before I learned ColdFusion and it wasn&#8217;t a terrible language.  Server setup was pretty simple and changing the configuration file was also pretty easy.  There are also a TON of sites written in PHP so usually if I Googled an error, somewhere, someone would have the answer but my main complaint when using PHP was the amount of code I had to write to achieve a certain function.  To get a decent PHP page took long hours and tons of lines of code and really made me dislike the language more and more. Also PHP is very OOP and I was never fond of that type of programming.  I would reccomend learning PHP first before any other languages though.  If taught correctly, it can be a great introduction to server-side language and development but people should explore the other options.  </p>
<p>The statelessness of server-side applications can be hard thing to grasp at first but as you begin to develop applications, you will learn real quick.  Essentially, all pages that you create that use a server-side language do not contain the data until they are requested.  Unlike a regular HTML page that contains all of the data, regardless of any user conditions or page variables, the dynamic page just sits there, waiting to be requested and process the code.  The main issue with this is that there is no way to save the page for a particular person, without having to create for each user and with sites with hundreds of members, this would just not be practical.  A way around this is using Session Variables and/or Cookies.  An easy example of this is a login form.  When you login to most websites,  you do not have to login again until you close the browser or physically log out of the system.  This is done via Session Variables.  Session Variables are a sort of global varial that has ties into the browses, so they can be cleared whenever the user closes their browser.  When you login somewhere, a Session Variable is created and is stored in the server’s memory to remember you.  This way, you can have one dynamic page but have millions of different kinds of data show<br />
up.</p></blockquote>
<p>What do you think?</p>
]]></content:encoded>
			<wfw:commentRss>http://i-am-geek.com/blog/?feed=rss2&#038;p=190</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My ISAPI Adventure</title>
		<link>http://i-am-geek.com/blog/?p=177</link>
		<comments>http://i-am-geek.com/blog/?p=177#comments</comments>
		<pubDate>Thu, 02 Jun 2011 20:49:57 +0000</pubDate>
		<dc:creator>i_am_geek</dc:creator>
				<category><![CDATA[Code Examples]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[Isapi]]></category>

		<guid isPermaLink="false">http://i-am-geek.com/blog/?p=177</guid>
		<description><![CDATA[A client of mine came to me and asked to have the server process his product pages (cfm) to html for SEO purposes.  I had done this in the past for another site but as usual, its never as simple as copy and paste.  So after trying the older code, it was clear I had [...]]]></description>
			<content:encoded><![CDATA[<p>A client of mine came to me and asked to have the server process his product pages (cfm) to html for SEO purposes.  I had done this in the past for another site but as usual, its never as simple as copy and paste.  So after trying the older code, it was clear I had to make some changes.</p>
<p>First up, I had to make a .html product link for each product.  Here is how I accomplished that:</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> prodlink <span style="color: #0000FF;">=</span> getproducts.<span style="color: #0000FF;">name</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> prodlink <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">replacelist</span><span style="color: #0000FF;">&#40;</span><span style="color: #0000FF;">trim</span><span style="color: #0000FF;">&#40;</span>prodlink<span style="color: #0000FF;">&#41;</span>,<span style="color: #009900;">&quot; ,-&quot;</span>,<span style="color: #009900;">&quot;_,_&quot;</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> prodlink <span style="color: #0000FF;">=</span> prodlink <span style="color: #0000FF;">&amp;</span> <span style="color: #009900;">&quot;_&quot;</span> <span style="color: #0000FF;">&amp;</span> getproducts.<span style="color: #0000FF;">id</span> <span style="color: #0000FF;">&amp;</span> <span style="color: #009900;">&quot;.html&quot;</span><span style="color: #0000FF;">&gt;</span></span></pre></div></div>

<p>I first set my prodLink variable to the current name of the product being displayed.  I then remove any spaces in the name (for those products with long names) and insert underscores to start building the link.  I then append in the id of the product (I will be using this to pull in the info later on) and then give it the .html extension.</p>
<p>Now lets jump over to the ISAPI part and show you what I did.</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;">RewriteEngine On
RewriteRule ^[^?/]*_(\d+)\.html? store_info.cfm?ID=$1 [NC,L]</pre></div></div>

<p>*For those of you unfamiliar with ISAPI, I will explain what all this means.*</p>
<p>First, I set the RewriteEngine to on (for security reasons, it is globally turned off) and then I started to work on the rule to grab any file with an html extension with a trailing underscore. That is what this part accomplishes &#8220;RewriteRule ^[^?/]*_(\d+)\.html?&#8221;</p>
<p>The second part is where I want ISAPI to redirect if the first part matches something.  I need to send it to the page that displays the info, along with the ID of the product.  This is how the store is functioning now.  Sending an ID over a URL string to the info page, which then displays the corresponding information.  So although I am now going to an html page, it is actually still hitting my ColdFusion page in the exact same way, just done as an html page instead of displaying the store_info.cfm?id= in the URL.</p>
<p>Now if you are reading this and saying &#8220;seems pretty simple and straight forward&#8221;.  Well you are right, the solution I came up with is simple but it took me over 3 hours to get to this.  I kept getting 404 errors when testing my new .html pages because it wasn&#8217;t able to redirect to the ColdFusion page. The problem wasn&#8217;t with my code, or ISAPI but the mappings on my server that ColdFusion setup on install. A blog post that I found while googling ISAPI and Coldfusion on IIS7 had my answer. The blog post (<a href="http://www.helicontech.com/articles/adjusting-coldfusionisapi_rewrite-collaboration/">Link</a>) stated that &#8220;The problem lies in handler mappings configuration. To resolve it, any handler mappings for *.cfm extension should be mapped to 1\jrun_iis6_wildcard.dll executable (instead of jrun_iis6.dll).&#8221;</p>
<p>So I looked in my Handler Mappings in IIS7 for the site I was working on and sure enough, it was pointing to the jrun_iis6.dl.  A quick edit, site restart, and bam, everything worked like a charm.</p>
<div id="attachment_183" class="wp-caption aligncenter" style="width: 279px"><a href="http://i-am-geek.com/blog/wp-content/uploads/2011/06/Screen-shot-2011-06-02-at-4.39.39-PM.png"><img class="size-medium wp-image-183 " title="Handler Mappings" src="http://i-am-geek.com/blog/wp-content/uploads/2011/06/Screen-shot-2011-06-02-at-4.39.39-PM-269x300.png" alt="Handler Mappings" width="269" height="300" /></a><p class="wp-caption-text">The updated mapping</p></div>
<p>Now the blog post tells you to replace all of them by dropping in a config file but IIS7 has a built in way to edit these. Seeing this site doesn&#8217;t use any of the other ColdFusion extensions beyond .cfm, I only changed that one.</p>
<p>So thats it&#8230;.3 hours of googling, testing and bugging people for help comes down to a few paragraphs and a few simple steps on how to fix my issue.  Now my client has ColdFusion pages displayed with a html extension.</p>
]]></content:encoded>
			<wfw:commentRss>http://i-am-geek.com/blog/?feed=rss2&#038;p=177</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I am NOT a freelancer</title>
		<link>http://i-am-geek.com/blog/?p=169</link>
		<comments>http://i-am-geek.com/blog/?p=169#comments</comments>
		<pubDate>Tue, 24 May 2011 14:40:34 +0000</pubDate>
		<dc:creator>i_am_geek</dc:creator>
				<category><![CDATA[Blackfish Development]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://i-am-geek.com/blog/?p=169</guid>
		<description><![CDATA[I hate to bitch&#8230;but here we go. &#60;start rant&#62; For those of you who don&#8217;t know, there are people who are called &#8216;Freelance developers/designers/etc&#8217; and essentially these people have no steady client base and really just do one off jobs.  This is not a bad thing and many people make a great living doing this. [...]]]></description>
			<content:encoded><![CDATA[<p>I hate to bitch&#8230;but here we go.</p>
<p>&lt;start rant&gt;</p>
<p>For those of you who don&#8217;t know, there are people who are called &#8216;Freelance developers/designers/etc&#8217; and essentially these people have no steady client base and really just do one off jobs.  This is not a bad thing and many people make a great living doing this.  This post is not against them, its against people who assume since I work on the web for myself, I am simply a freelancer.  Well I am not.  I run a business from top to bottom, janitor to ceo, pushing papers to pushing code and it really irriates me when people think I just sit at my computer and type code all day.  It is so much more involved then that.</p>
<p>I would love to see some of these people do what I do on a daily/weekly/monthly basis.  Not trying to say I am the shit and better then everyone else but I don&#8217;t know many 25 year old business owners who support themselves 100% on their own.  This is me.  I am a business owner and the only full time employee.  That means, anytime Blackfish Development does anything, anything at all, I am responsible for that.  I am not looking for a metal or a crown to wear around (which would be sweet) just the respect that I deserve for doing what most people only dream of doing.</p>
<p>So if you want to know what its like to run a business and be 100% responsible 150% of the time.  Go to your work and tell everyone to take the next week off, janitor to ceo, and you do all of the jobs.</p>
<p>&nbsp;</p>
<p>#getOnMyLevel</p>
<p>&lt;/end rant&gt;</p>
<p>&nbsp;</p>
<p>edit:  People think I have something against freelancers or being called a freelancer is a bad thing. It is not.  I have no issue with freelancers and it is not below me in any way.  I just am more then a freelancer. I have over 90 clients who I handle development work, consulting work and I also run hosting for over 60 of those clients.</p>
]]></content:encoded>
			<wfw:commentRss>http://i-am-geek.com/blog/?feed=rss2&#038;p=169</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Let&#8217;s try this again</title>
		<link>http://i-am-geek.com/blog/?p=95</link>
		<comments>http://i-am-geek.com/blog/?p=95#comments</comments>
		<pubDate>Fri, 25 Mar 2011 19:39:22 +0000</pubDate>
		<dc:creator>i_am_geek</dc:creator>
				<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://i-am-geek.com/blog/?p=95</guid>
		<description><![CDATA[Well, this is probably the 3rd time I have brought this blog back but here goes.  As you will see this is my first post in a long time, so I will be writing some new ones over the course of the next week.  Please feel free to cruise the old posts, they are actually [...]]]></description>
			<content:encoded><![CDATA[<p>Well, this is probably the 3rd time I have brought this blog back but here goes.  As you will see this is my first post in a long time, so I will be writing some new ones over the course of the next week.  Please feel free to cruise the old posts, they are actually pretty decent.  Going to be adding more content/widgets/fluffery in as well, so stay tuned.</p>
]]></content:encoded>
			<wfw:commentRss>http://i-am-geek.com/blog/?feed=rss2&#038;p=95</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Client Email &#8220;Problem&#8221;</title>
		<link>http://i-am-geek.com/blog/?p=75</link>
		<comments>http://i-am-geek.com/blog/?p=75#comments</comments>
		<pubDate>Wed, 21 Jan 2009 15:55:47 +0000</pubDate>
		<dc:creator>i_am_geek</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[humor]]></category>

		<guid isPermaLink="false">http://www.i-am-geek.com/?p=75</guid>
		<description><![CDATA[This really isn&#8217;t a post about ColdFusion or any language really, just a story I would like to share. (FYI, this is a true story, I am not creative enough to make this up) I received an email yesterday from a client, stating that her email is messing up and that they think someone &#8220;stole&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>This really isn&#8217;t a post about ColdFusion or any language really, just a story I would like to share. (FYI, this is a true story, I am not creative enough to make this up)</p>
<p>I received an email yesterday from a client, stating that her email is messing up and that they think someone &#8220;stole&#8221; an address.  I immediately checked the site to see if it was hacked or anyway altered and came up with nothing.  So I called the customer and got the first hand details, &#8220;I keep getting emails from someone named Don O&#8217;treply and there is no one here with that name, I think we are getting hacked&#8221;.  I paused for a second on the phone and asked if she could forward me an email and I would look into it and get back to them.  As soon as that email hit my inbox I couldn&#8217;t believe my eyes Don O&#8217;treply = donotreply@xxxxx.com .  Apparently this person was receiving emails from their site that had a contact us form on it, with the from address pointing to Mr Don O&#8217;treply.  After forwarding the email around the office and composing myself, I called her back, explained the situation, and told her everything was perfectly fine and that I fixed it so she will not receive them anymore.</p>
<p>Some people amaze me&#8230;especially the ones that are high in companies, but delete emails before reading them if they do not recognize the from address ( or read the subject for that matter ).</p>
<p>Good Stuff&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://i-am-geek.com/blog/?feed=rss2&#038;p=75</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>What do you use?</title>
		<link>http://i-am-geek.com/blog/?p=72</link>
		<comments>http://i-am-geek.com/blog/?p=72#comments</comments>
		<pubDate>Wed, 14 Jan 2009 16:23:38 +0000</pubDate>
		<dc:creator>i_am_geek</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[CFEclipse]]></category>
		<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[programs]]></category>

		<guid isPermaLink="false">http://www.i-am-geek.com/?p=72</guid>
		<description><![CDATA[Recently I have heard a lot about Eclipse/CfEclipse and was just wondering what the fuss is all about.  I have used Dreamweaver for about 6 years and it has always served me well but now I hear a lot about developers using Eclipse and I wanted to know what are the pros and cons of [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I have heard a lot about Eclipse/CfEclipse and was just wondering what the fuss is all about.  I have used Dreamweaver for about 6 years and it has always served me well but now I hear a lot about developers using Eclipse and I wanted to know what are the pros and cons of using Eclipse over Dreamweaver.  Also let me know what you use and what you think makes it better then anything else.</p>
<p>Any feedback would be great!!</p>
]]></content:encoded>
			<wfw:commentRss>http://i-am-geek.com/blog/?feed=rss2&#038;p=72</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Regular Expressions Part 2</title>
		<link>http://i-am-geek.com/blog/?p=67</link>
		<comments>http://i-am-geek.com/blog/?p=67#comments</comments>
		<pubDate>Tue, 13 Jan 2009 00:46:47 +0000</pubDate>
		<dc:creator>i_am_geek</dc:creator>
				<category><![CDATA[Code Examples]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Cfloop]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[regular expressions]]></category>

		<guid isPermaLink="false">http://www.i-am-geek.com/?p=67</guid>
		<description><![CDATA[A few posts ago I started explaining my recent RegEx problems and how I ended up solving them. This post will be what I did next: The first part I wanted to just get a list of referrers and how many times they were used. This post will be the next part of that and [...]]]></description>
			<content:encoded><![CDATA[<p>A few posts ago I started explaining my recent RegEx problems and how I ended up solving them.  This post will be what I did next:</p>
<p>The first part I wanted to just get a list of referrers and how many times they were used.  This post will be the next part of that and how I grabbed the exact searched keywords and made a report on a few things about them.  First thing I did was made 3 lists depending on what domain the referrer was from ( google, msn, and yahoo ) by grabbing the url string and then breaking it down into what I wanted:</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfquery</span> <span style="color: #0000FF;">datasource</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;#db#&quot;</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;getCat&quot;</span><span style="color: #0000FF;">&gt;</span></span>
	SELECT     id, referer
	FROM         orders
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfquery</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfquery</span> <span style="color: #0000FF;">datasource</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;#db#&quot;</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;getInfo&quot;</span><span style="color: #0000FF;">&gt;</span></span>
	SELECT     id, referer
	FROM         orders
	WHERE     (referer LIKE '%google%') OR
		      (referer LIKE '%search.msn%') OR
		      (referer LIKE '%search.yahoo.com%') AND (NOT (referer IS NULL))
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfquery</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #808080; font-style: italic;">&lt;!--- CREATE LISTS FOR KEYWORDS ---&gt;</span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> googlist<span style="color: #0000FF;">=</span> <span style="color: #009900;">''</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> msnlist<span style="color: #0000FF;">=</span> <span style="color: #009900;">''</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> yahoolist<span style="color: #0000FF;">=</span> <span style="color: #009900;">''</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfoutput</span> <span style="color: #0000FF;">query</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;getInfo&quot;</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfif</span> referer contains <span style="color: #009900;">'google'</span><span style="color: #0000FF;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> googlist <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">listappend</span><span style="color: #0000FF;">&#40;</span>googlist,<span style="color: #009900;">'#getinfo.referer#'</span>,<span style="color: #009900;">','</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfif</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfif</span> referer contains <span style="color: #009900;">'msn'</span><span style="color: #0000FF;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> msnlist <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">listappend</span><span style="color: #0000FF;">&#40;</span>msnlist,<span style="color: #009900;">'#getinfo.referer#'</span>,<span style="color: #009900;">','</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfif</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfif</span> referer contains <span style="color: #009900;">'yahoo'</span><span style="color: #0000FF;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> yahoolist <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">listappend</span><span style="color: #0000FF;">&#40;</span>yahoolist,<span style="color: #009900;">'#getinfo.referer#'</span>,<span style="color: #009900;">','</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfif</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfoutput</span><span style="color: #0000FF;">&gt;</span></span></pre></div></div>

<p>Now that I have my lists, I needed to break it down:</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfloop</span> <span style="color: #0000FF;">query</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;getcat&quot;</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> keys <span style="color: #0000FF;">=</span> <span style="color: #009900;">&quot;&quot;</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> <span style="color: #0000FF;">name</span> <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplace</span><span style="color: #0000FF;">&#40;</span>getcat.referer, <span style="color: #009900;">'http://www.'</span>,<span style="color: #009900;">''</span>,<span style="color: #009900;">'ALL'</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> <span style="color: #0000FF;">name</span> <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplace</span><span style="color: #0000FF;">&#40;</span><span style="color: #0000FF;">name</span>, <span style="color: #009900;">'http://'</span>,<span style="color: #009900;">''</span>,<span style="color: #009900;">'ALL'</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> <span style="color: #0000FF;">name</span> <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplace</span><span style="color: #0000FF;">&#40;</span><span style="color: #0000FF;">name</span>, <span style="color: #009900;">'.com'</span>,<span style="color: #009900;">''</span>,<span style="color: #009900;">'ALL'</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> <span style="color: #0000FF;">name</span> <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplace</span><span style="color: #0000FF;">&#40;</span><span style="color: #0000FF;">name</span>, <span style="color: #009900;">'.net'</span>,<span style="color: #009900;">''</span>,<span style="color: #009900;">'ALL'</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> <span style="color: #0000FF;">name</span> <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">ReReplaceNoCase</span><span style="color: #0000FF;">&#40;</span><span style="color: #0000FF;">name</span>, <span style="color: #009900;">'/.*'</span>,<span style="color: #009900;">''</span>,<span style="color: #009900;">'all'</span><span style="color: #0000FF;">&#41;</span> <span style="color: #0000FF;">/&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfif</span> <span style="color: #0000FF;">name</span> <span style="color: #0000FF;">neq</span> <span style="color: #009900;">''</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #808080; font-style: italic;">&lt;!--- GOOGLE ---&gt;</span>
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfif</span> getcat.referer contains <span style="color: #009900;">&quot;http://www.google.com&quot;</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> skiprow <span style="color: #0000FF;">=</span> <span style="color: #FF0000;">0</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> tmplist <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplace</span><span style="color: #0000FF;">&#40;</span>getcat.referer, <span style="color: #009900;">'http://www.google.com'</span>,<span style="color: #009900;">''</span>,<span style="color: #009900;">'ALL'</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfif</span> tmplist contains <span style="color: #009900;">&quot;?q=&quot;</span><span style="color: #0000FF;">&gt;</span></span>
				<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> tmplist <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplacenocase</span><span style="color: #0000FF;">&#40;</span>tmplist,<span style="color: #009900;">'^.*?q='</span>,<span style="color: #009900;">''</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfelseif</span>  tmplist contains <span style="color: #009900;">&quot;?q=&quot;</span><span style="color: #0000FF;">&gt;</span></span>
				<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> tmplist <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplacenocase</span><span style="color: #0000FF;">&#40;</span>tmplist,<span style="color: #009900;">'^.*&amp;q='</span>,<span style="color: #009900;">''</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfelse</span><span style="color: #0000FF;">&gt;</span></span>
				<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> skiprow <span style="color: #0000FF;">=</span> <span style="color: #FF0000;">1</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfif</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> tmplist <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplacenocase</span><span style="color: #0000FF;">&#40;</span>tmplist,<span style="color: #009900;">'&amp;.*$'</span>,<span style="color: #009900;">''</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> tmplist <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">replacenocase</span><span style="color: #0000FF;">&#40;</span>tmplist,<span style="color: #009900;">'+'</span>,<span style="color: #009900;">' '</span>,<span style="color: #009900;">'all'</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfif</span> skiprow <span style="color: #0000FF;">is</span> <span style="color: #FF0000;">0</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> keys <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">urldecode</span><span style="color: #0000FF;">&#40;</span>tmplist<span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfif</span><span style="color: #0000FF;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfif</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #808080; font-style: italic;">&lt;!--- MSN ---&gt;</span>
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfif</span> getcat.referer contains <span style="color: #009900;">&quot;http://search.msn.com&quot;</span> or getcat.referer contains <span style="color: #009900;">&quot;http://search.live.com&quot;</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> skiprow <span style="color: #0000FF;">=</span> <span style="color: #FF0000;">0</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> tmplist2 <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplace</span><span style="color: #0000FF;">&#40;</span>getcat.referer, <span style="color: #009900;">'http://search.msn.com'</span>,<span style="color: #009900;">''</span>,<span style="color: #009900;">'ALL'</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> tmplist2 <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplace</span><span style="color: #0000FF;">&#40;</span>getcat.referer, <span style="color: #009900;">'http://search.live.com'</span>,<span style="color: #009900;">''</span>,<span style="color: #009900;">'ALL'</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfif</span> tmplist2 contains <span style="color: #009900;">&quot;?q=&quot;</span><span style="color: #0000FF;">&gt;</span></span>
				<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> tmplist2 <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplacenocase</span><span style="color: #0000FF;">&#40;</span>tmplist2,<span style="color: #009900;">'^.*?q='</span>,<span style="color: #009900;">''</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfelseif</span>  tmplist2 contains <span style="color: #009900;">&quot;?q=&quot;</span><span style="color: #0000FF;">&gt;</span></span>
				<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> tmplist2 <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplacenocase</span><span style="color: #0000FF;">&#40;</span>tmplist2,<span style="color: #009900;">'^.*&amp;q='</span>,<span style="color: #009900;">''</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfelse</span><span style="color: #0000FF;">&gt;</span></span>
				<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> skiprow <span style="color: #0000FF;">=</span> <span style="color: #FF0000;">1</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfif</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> tmplist2 <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplacenocase</span><span style="color: #0000FF;">&#40;</span>tmplist2,<span style="color: #009900;">'&amp;.*$'</span>,<span style="color: #009900;">''</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> tmplist2 <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">replacenocase</span><span style="color: #0000FF;">&#40;</span>tmplist2,<span style="color: #009900;">'+'</span>,<span style="color: #009900;">' '</span>,<span style="color: #009900;">'all'</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfif</span> skiprow <span style="color: #0000FF;">is</span> <span style="color: #FF0000;">0</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> keys <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">urldecode</span><span style="color: #0000FF;">&#40;</span>tmplist2<span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfif</span><span style="color: #0000FF;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfif</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #808080; font-style: italic;">&lt;!--- YAHOOOOOO ---&gt;</span>
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfif</span> getcat.referer contains <span style="color: #009900;">&quot;http://search.yahoo.com&quot;</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> skiprow <span style="color: #0000FF;">=</span> <span style="color: #FF0000;">0</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> tmplist3 <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplace</span><span style="color: #0000FF;">&#40;</span>getcat.referer, <span style="color: #009900;">'http://search.yahoo.com'</span>,<span style="color: #009900;">''</span>,<span style="color: #009900;">'ALL'</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfif</span> tmplist3 contains <span style="color: #009900;">&quot;?p=&quot;</span><span style="color: #0000FF;">&gt;</span></span>
				<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> tmplist3 <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplacenocase</span><span style="color: #0000FF;">&#40;</span>tmplist3,<span style="color: #009900;">'^.*?p='</span>,<span style="color: #009900;">''</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfelseif</span>  tmplist3 contains <span style="color: #009900;">&quot;?p=&quot;</span><span style="color: #0000FF;">&gt;</span></span>
				<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> tmplist3 <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplacenocase</span><span style="color: #0000FF;">&#40;</span>tmplist3,<span style="color: #009900;">'^.*&amp;p='</span>,<span style="color: #009900;">''</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfelse</span><span style="color: #0000FF;">&gt;</span></span>
				<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> skiprow <span style="color: #0000FF;">=</span> <span style="color: #FF0000;">1</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfif</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> tmplist3 <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplacenocase</span><span style="color: #0000FF;">&#40;</span>tmplist3,<span style="color: #009900;">'&amp;.*$'</span>,<span style="color: #009900;">''</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> tmplist3 <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">replacenocase</span><span style="color: #0000FF;">&#40;</span>tmplist3,<span style="color: #009900;">'+'</span>,<span style="color: #009900;">' '</span>,<span style="color: #009900;">'all'</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfif</span> skiprow <span style="color: #0000FF;">is</span> <span style="color: #FF0000;">0</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> keys <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">urldecode</span><span style="color: #0000FF;">&#40;</span>tmplist3<span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfif</span><span style="color: #0000FF;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfif</span><span style="color: #0000FF;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfquery</span> <span style="color: #0000FF;">datasource</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;#db#&quot;</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;insert&quot;</span><span style="color: #0000FF;">&gt;</span></span>
			Insert Into Referers
			VALUES
			('<span style="color: #0000FF;">#name#</span>', <span style="color: #0000FF;">#id#</span>, '<span style="color: #0000FF;">#keys#</span>')
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfquery</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfif</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfloop</span><span style="color: #0000FF;">&gt;</span></span></pre></div></div>

<p>Now let me break this down and explain what I did:</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfloop</span> <span style="color: #0000FF;">query</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;getcat&quot;</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> keys <span style="color: #0000FF;">=</span> <span style="color: #009900;">&quot;&quot;</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> <span style="color: #0000FF;">name</span> <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplace</span><span style="color: #0000FF;">&#40;</span>getcat.referer, <span style="color: #009900;">'http://www.'</span>,<span style="color: #009900;">''</span>,<span style="color: #009900;">'ALL'</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> <span style="color: #0000FF;">name</span> <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplace</span><span style="color: #0000FF;">&#40;</span><span style="color: #0000FF;">name</span>, <span style="color: #009900;">'http://'</span>,<span style="color: #009900;">''</span>,<span style="color: #009900;">'ALL'</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> <span style="color: #0000FF;">name</span> <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplace</span><span style="color: #0000FF;">&#40;</span><span style="color: #0000FF;">name</span>, <span style="color: #009900;">'.com'</span>,<span style="color: #009900;">''</span>,<span style="color: #009900;">'ALL'</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> <span style="color: #0000FF;">name</span> <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplace</span><span style="color: #0000FF;">&#40;</span><span style="color: #0000FF;">name</span>, <span style="color: #009900;">'.net'</span>,<span style="color: #009900;">''</span>,<span style="color: #009900;">'ALL'</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> <span style="color: #0000FF;">name</span> <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">ReReplaceNoCase</span><span style="color: #0000FF;">&#40;</span><span style="color: #0000FF;">name</span>, <span style="color: #009900;">'/.*'</span>,<span style="color: #009900;">''</span>,<span style="color: #009900;">'all'</span><span style="color: #0000FF;">&#41;</span> <span style="color: #0000FF;">/&gt;</span></span></pre></div></div>

<p>This piece of code grabs the referrer and strips out everything i don&#8217;t want ( this was part of the original post but just moved to suit my final needs )</p>
<p>Next I started grabbing the keywords out of the url string based on each search engines unique url string.  I&#8217;ll show google&#8217;s and then explain:</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfif</span> getcat.referer contains <span style="color: #009900;">&quot;http://www.google.com&quot;</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> skiprow <span style="color: #0000FF;">=</span> <span style="color: #FF0000;">0</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> tmplist <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplace</span><span style="color: #0000FF;">&#40;</span>getcat.referer, <span style="color: #009900;">'http://www.google.com'</span>,<span style="color: #009900;">''</span>,<span style="color: #009900;">'ALL'</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfif</span> tmplist contains <span style="color: #009900;">&quot;?q=&quot;</span><span style="color: #0000FF;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> tmplist <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplacenocase</span><span style="color: #0000FF;">&#40;</span>tmplist,<span style="color: #009900;">'^.*?q='</span>,<span style="color: #009900;">''</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfelse</span><span style="color: #0000FF;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> skiprow <span style="color: #0000FF;">=</span> <span style="color: #FF0000;">1</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfif</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> tmplist <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplacenocase</span><span style="color: #0000FF;">&#40;</span>tmplist,<span style="color: #009900;">'&amp;.*$'</span>,<span style="color: #009900;">''</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> tmplist <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">replacenocase</span><span style="color: #0000FF;">&#40;</span>tmplist,<span style="color: #009900;">'+'</span>,<span style="color: #009900;">' '</span>,<span style="color: #009900;">'all'</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfif</span> skiprow <span style="color: #0000FF;">is</span> <span style="color: #FF0000;">0</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> keys <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">urldecode</span><span style="color: #0000FF;">&#40;</span>tmplist<span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfif</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfif</span><span style="color: #0000FF;">&gt;</span></span></pre></div></div>

<p>First few lines are pretty easy to explain, if the original record from the table, not the stripped down version, contains &#8220;http://www.google.com&#8221; start editing the string.  First thing I did was delete the &#8220;http://www.google.com&#8221; and then grab everything after &#8220;?q=&#8221;.  This is what google uses when it starts it search query ( ie keywords searched ).  So now we have something resembling this: some+example+keywords&#038;btnG=Google+Search&#038;aq=f&#038;oq=</p>
<p>This is a great start and how i needed to grab the keywords and bag the rest.  Google ends its keywrods with a &#8216;&#038;&#8217;.  So now I set up a RegEx to grab everything before the &#038; and then replace the remaining &#8220;+&#8221; with just spaces, thus leaving: some example keywords.  </p>
<p>You might be noticing the skiprow variable that I have set up.  That is so incase the referrer contains &#8220;http://www.google.com&#8221; but after everything is stripped out there is nothing left, it skips that record and loops back around.  Once it is done looping over itself, I have it inserting into a temporary table with the name of the referrer, order id it came from, and all the keys that were in that order.</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfif</span> skiprow <span style="color: #0000FF;">is</span> <span style="color: #FF0000;">0</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> keys <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">urldecode</span><span style="color: #0000FF;">&#40;</span>tmplist3<span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfif</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfquery</span> <span style="color: #0000FF;">datasource</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;#db#&quot;</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;insert&quot;</span><span style="color: #0000FF;">&gt;</span></span>
	Insert Into Referers
	VALUES
	('<span style="color: #0000FF;">#name#</span>', <span style="color: #0000FF;">#id#</span>, '<span style="color: #0000FF;">#keys#</span>')
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfquery</span><span style="color: #0000FF;">&gt;</span></span></pre></div></div>

<p>This was a pretty extensive report but after it was all said and done I had learned a whole bunch about regular expression and how great they can be when you know what you want to do.  I am happy to take any suggestions on trimming this up or doing it a smarter way.  </p>
]]></content:encoded>
			<wfw:commentRss>http://i-am-geek.com/blog/?feed=rss2&#038;p=67</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Export To Excel</title>
		<link>http://i-am-geek.com/blog/?p=59</link>
		<comments>http://i-am-geek.com/blog/?p=59#comments</comments>
		<pubDate>Fri, 09 Jan 2009 04:14:48 +0000</pubDate>
		<dc:creator>i_am_geek</dc:creator>
				<category><![CDATA[Code Examples]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[excel function]]></category>

		<guid isPermaLink="false">http://www.i-am-geek.com/?p=59</guid>
		<description><![CDATA[Here is a function that I seem to use a lot. Exporting things to excel can be a pretty useful feature and is extremely to set up. What I do is make a param called excel: &#60;cfparam name = &#34;excel&#34; default = &#34;&#34;&#62; Then I set up my url string to trigger the excel function: [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a function that I seem to use a lot.</p>
<p>Exporting things to excel can be a pretty useful feature and is extremely to set up.  What I do is make a param called excel:</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfparam</span> <span style="color: #0000FF;">name</span> <span style="color: #0000FF;">=</span> <span style="color: #009900;">&quot;excel&quot;</span> <span style="color: #0000FF;">default</span> <span style="color: #0000FF;">=</span> <span style="color: #009900;">&quot;&quot;</span><span style="color: #0000FF;">&gt;</span></span></pre></div></div>

<p>Then I set up my url string to trigger the excel function:</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfif</span> excel <span style="color: #0000FF;">eq</span> <span style="color: #FF0000;">1</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfcontent</span> <span style="color: #0000FF;">type</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;application/msexcel&quot;</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfheader</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;content-disposition&quot;</span> <span style="color: #0000FF;">value</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;filename=report.xls&quot;</span><span style="color: #0000FF;">&gt;</span></span>
&nbsp;
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">table</span> <span style="color: #0000FF;">width</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;100%&quot;</span> <span style="color: #0000FF;">cellpadding</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;0&quot;</span> <span style="color: #0000FF;">cellspacing</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;2&quot;</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfoutput</span><span style="color: #0000FF;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">tr</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">td</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">strong</span> <span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfif</span> sortby <span style="color: #0000FF;">eq</span> <span style="color: #009900;">'Name'</span><span style="color: #0000FF;">&gt;</span><span style="color: #0000FF;">style</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;color:##FF0000&quot;</span><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfif</span><span style="color: #0000FF;">&gt;&gt;</span></span>Name<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">strong</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">td</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">td</span> <span style="color: #0000FF;">align</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;right&quot;</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">strong</span> <span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfif</span> sortby <span style="color: #0000FF;">eq</span> <span style="color: #009900;">'Date'</span><span style="color: #0000FF;">&gt;</span><span style="color: #0000FF;">style</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;color:##FF0000&quot;</span><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfif</span><span style="color: #0000FF;">&gt;&gt;</span></span>Date<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">strong</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">td</span><span style="color: #0000FF;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">tr</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfoutput</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">tr</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">td</span> <span style="color: #0000FF;">colspan</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;2&quot;</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">img</span> <span style="color: #0000FF;">src</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;images/blackLine.gif&quot;</span> <span style="color: #0000FF;">width</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;100%&quot;</span> <span style="color: #0000FF;">height</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;1&quot;</span> <span style="color: #0000FF;">alt</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;&quot;</span> <span style="color: #0000FF;">border</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;0&quot;</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">td</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">tr</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfoutput</span> <span style="color: #0000FF;">query</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;getinfo&quot;</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">tr</span> <span style="color: #0000FF;">bgcolor</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;#IIf(currentrow mod 2, DE('ffffcf'),DE('ffffff'))#&quot;</span><span style="color: #0000FF;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">td</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #0000FF;">#name#</span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">td</span><span style="color: #0000FF;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">td</span> <span style="color: #0000FF;">align</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;right&quot;</span><span style="color: #0000FF;">&gt;</span></span>#dateformat(date, 'mm/dd/yyyy')#<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">td</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">tr</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">tr</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">td</span> <span style="color: #0000FF;">colspan</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;2&quot;</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">img</span> <span style="color: #0000FF;">src</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;images/blackLine.gif&quot;</span> <span style="color: #0000FF;">width</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;100%&quot;</span> <span style="color: #0000FF;">height</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;1&quot;</span> <span style="color: #0000FF;">alt</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;&quot;</span> <span style="color: #0000FF;">border</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;0&quot;</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">td</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">tr</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfoutput</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">table</span><span style="color: #0000FF;">&gt;</span></span>
&nbsp;
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfif</span><span style="color: #0000FF;">&gt;</span></span></pre></div></div>

<p>Basically you just want to set up what you want to export and format it so everything will look ok in excel.</p>
<p>Then add a link to trigger the export:</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">a</span> <span style="color: #0000FF;">href</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;index.cfm?page=#filename#&amp;excel=1&lt;cfif isdefined(&quot;</span>form.fromdate<span style="color: #009900;">&quot;) and form.fromdate neq &quot;</span><span style="color: #009900;">&quot;&gt;&amp;&lt;fromdate=#lsdateformat(form.fromdate,'mm/dd/yyyy')#&lt;/cfif&gt;&lt;cfif isdefined(&quot;</span>form.todate<span style="color: #009900;">&quot;) and form.todate neq &quot;</span><span style="color: #009900;">&quot;&gt;&amp;todate=#lsdateformat(form.todate,'mm/dd/yyyy')#&lt;/cfif&gt;&amp;sortby=#sortby#&quot;</span> <span style="color: #0000FF;">target</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;_blank&quot;</span><span style="color: #0000FF;">&gt;</span></span>Open in Excel<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">a</span><span style="color: #0000FF;">&gt;</span></span></pre></div></div>

<p>As you can see, I passed a few variables along because this is used on a report page where the user can search by date and also order the columns.  Its very easy to set up and customers seem to love it.</p>
]]></content:encoded>
			<wfw:commentRss>http://i-am-geek.com/blog/?feed=rss2&#038;p=59</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Regular Expressions</title>
		<link>http://i-am-geek.com/blog/?p=56</link>
		<comments>http://i-am-geek.com/blog/?p=56#comments</comments>
		<pubDate>Thu, 08 Jan 2009 16:43:47 +0000</pubDate>
		<dc:creator>i_am_geek</dc:creator>
				<category><![CDATA[Code Examples]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[regular expressions]]></category>
		<category><![CDATA[Sql]]></category>

		<guid isPermaLink="false">http://www.i-am-geek.com/?p=56</guid>
		<description><![CDATA[Yesterday, via my Twitter, I had mentioned a post about adding a referrals report sometime in the early afternoon.  Well that didn&#8217;t work out the way I had wanted.  My knowledge with regular expressions is pretty limited, so the problem I had took some extra time. Here is the scenario: I recently set up a [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, via my <a href="http://www.twitter.com/i_am_geek">Twitter</a>, I had mentioned a post about adding a referrals report sometime in the early afternoon.  Well that didn&#8217;t work out the way I had wanted.  My knowledge with regular expressions is pretty limited, so the problem I had took some extra time.</p>
<p>Here is the scenario:</p>
<p>I recently set up a site to start grabbing where its visitors are coming from and then store that info in their order, if they order anything.  After waiting a few days to get some data, it was time to create their report.  What they wanted was a list of how many times a certain url was grabbed, the name of that domain, and the total number of sales from the domain as well.  I knew I had to some how strip out all the excess around the domain (<span style="color: #ff0000;">http://www.</span>google<span style="color: #ff0000;">.com/searchstringfromgoogle</span>) and I wanted to try my hand at regular expressions to accomplish this.</p>
<p>First thing I was did, was made my query and outputted the results.  Was a jumbled mess but was a start.  I then formatted that list to show the domain up to the .com/ on one line, and then the rest on the next.  This was so I could see what I was doing. Next thing I did was started the formatting process, first thing that went was the http://www.</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfloop</span> <span style="color: #0000FF;">query</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;getcat&quot;</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> <span style="color: #0000FF;">name</span> <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplace</span><span style="color: #0000FF;">&#40;</span>getcat.referer, <span style="color: #009900;">'http://www.'</span>,<span style="color: #009900;">''</span>,<span style="color: #009900;">'ALL'</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span></pre></div></div>

<p>Next went the domains with the &#8216;www&#8217;:</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;">	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> <span style="color: #0000FF;">name</span> <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplace</span><span style="color: #0000FF;">&#40;</span>getcat.referer, <span style="color: #009900;">'http://'</span>,<span style="color: #009900;">''</span>,<span style="color: #009900;">'ALL'</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span></pre></div></div>

<p>Next I got rid of the &#8216;.com&#8217; or the &#8216;.net&#8217;:</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;">	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> <span style="color: #0000FF;">name</span> <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplace</span><span style="color: #0000FF;">&#40;</span><span style="color: #0000FF;">name</span>, <span style="color: #009900;">'.com'</span>,<span style="color: #009900;">''</span>,<span style="color: #009900;">'ALL'</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
        <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> <span style="color: #0000FF;">name</span> <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">rereplace</span><span style="color: #0000FF;">&#40;</span><span style="color: #0000FF;">name</span>, <span style="color: #009900;">'.net'</span>,<span style="color: #009900;">''</span>,<span style="color: #009900;">'ALL'</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span></pre></div></div>

<p>Finally it was the tricky part that took me quite some time googling and searching other blogs.  I had to find something that would delete everything after the &#8216;/&#8217; where the .com or .net used to be.  Here is the final solution:</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;">	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> <span style="color: #0000FF;">name</span> <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">ReReplaceNoCase</span><span style="color: #0000FF;">&#40;</span><span style="color: #0000FF;">name</span>, <span style="color: #009900;">'/.*'</span>,<span style="color: #009900;">''</span>,<span style="color: #009900;">'all'</span><span style="color: #0000FF;">&#41;</span> <span style="color: #0000FF;">/&gt;</span></span></pre></div></div>

<p>This worked great and did exactly what I needed.  After this, I dumped all of the data into a temporary table so I could generate my report:</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfif</span> <span style="color: #0000FF;">name</span> <span style="color: #0000FF;">neq</span> <span style="color: #009900;">''</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfquery</span> <span style="color: #0000FF;">datasource</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;#db#&quot;</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;insert&quot;</span><span style="color: #0000FF;">&gt;</span></span>
		Insert Into Referers
		VALUES
		('<span style="color: #0000FF;">#name#</span>', <span style="color: #0000FF;">#id#</span>)
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfquery</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfif</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfloop</span><span style="color: #0000FF;">&gt;</span></span></pre></div></div>

<p>The next and final step was to make a dynamic select box and then print up the results based on what was selected:</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfquery</span> <span style="color: #0000FF;">datasource</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;#db#&quot;</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;getRef&quot;</span><span style="color: #0000FF;">&gt;</span></span>
SELECT     Referers.Name as Name, COUNT(Referers.Name) AS NameCnt, SUM(order_items.price) AS Total
FROM         Referers INNER JOIN
orders ON Referers.OrderID = orders.id INNER JOIN
order_items ON orders.id = order_items.id
GROUP BY Referers.Name, Referers.Name
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfquery</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">select</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;refname&quot;</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfoutput</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfloop</span> <span style="color: #0000FF;">query</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;getref&quot;</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">option</span> <span style="color: #0000FF;">value</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;#name#&quot;</span> <span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfif</span> <span style="color: #0000FF;">name</span> <span style="color: #0000FF;">eq</span> form.refname<span style="color: #0000FF;">&gt;</span><span style="color: #0000FF;">selected</span><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfif</span><span style="color: #0000FF;">&gt;&gt;</span></span>#UCase(Left(name,1))##mid(name,2,len(name)-1)#<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">option</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfloop</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfoutput</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">select</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">br</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">td</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">tr</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">tr</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">td</span> <span style="color: #0000FF;">colspan</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;3&quot;</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfquery</span> <span style="color: #0000FF;">datasource</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;#db#&quot;</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;getInfo&quot;</span><span style="color: #0000FF;">&gt;</span></span>
SELECT     Referers.Name as Name, COUNT(Referers.Name) AS NameCnt, SUM(order_items.price) AS Total
FROM         Referers INNER JOIN
orders ON Referers.OrderID = orders.id INNER JOIN
order_items ON orders.id = order_items.id
GROUP BY Referers.Name, Referers.Name
HAVING      (Referers.Name = '<span style="color: #0000FF;">#form.refname#</span>')
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfquery</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfoutput</span> <span style="color: #0000FF;">query</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;getInfo&quot;</span><span style="color: #0000FF;">&gt;</span></span>			
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">br</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">table</span> <span style="color: #0000FF;">border</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;1&quot;</span> bordercolor<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;000000&quot;</span> <span style="color: #0000FF;">cellpadding</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;3&quot;</span> <span style="color: #0000FF;">cellspacing</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;0&quot;</span> <span style="color: #0000FF;">align</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;center&quot;</span> <span style="color: #0000FF;">rules</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;rows&quot;</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">tr</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">td</span> <span style="color: #0000FF;">width</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;180&quot;</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">b</span><span style="color: #0000FF;">&gt;</span></span>Referer Name<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">b</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">td</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">td</span> <span style="color: #0000FF;">width</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;180&quot;</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #0000FF;">#name#</span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">td</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">tr</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">tr</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">td</span> <span style="color: #0000FF;">width</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;180&quot;</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">b</span><span style="color: #0000FF;">&gt;</span></span>Order Totals<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">b</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">td</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">td</span> <span style="color: #0000FF;">width</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;180&quot;</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #0000FF;">#lscurrencyformat<span style="color: #0000FF;">&#40;</span>Total<span style="color: #0000FF;">&#41;</span>#</span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">td</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">tr</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">tr</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">td</span> <span style="color: #0000FF;">width</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;180&quot;</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">b</span><span style="color: #0000FF;">&gt;</span></span>Number of Referers<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">b</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">td</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">td</span> <span style="color: #0000FF;">width</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;180&quot;</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #0000FF;">#numberformat<span style="color: #0000FF;">&#40;</span>NameCnt<span style="color: #0000FF;">&#41;</span>#</span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">td</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">tr</span><span style="color: #0000FF;">&gt;</span></span>			
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">table</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">td</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">tr</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfoutput</span><span style="color: #0000FF;">&gt;</span></span></pre></div></div>

<p>I learned a lot about Regular Expressions and how they are used.  They are extremely useful if they are applied in the correct manner.</p>
<p>Next post will be the next report I am doing with this info:<br />
Keyword statistics on Google, MSN, and Yahoo referrals.</p>
]]></content:encoded>
			<wfw:commentRss>http://i-am-geek.com/blog/?feed=rss2&#038;p=56</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

