Archive for May, 2009

Counting items with mysql and regex in the group by statement

Yesterday I needed to do a little report for the boss but the data that I needed to group together wasn’t exactly the same. I hit up the “Goog” for ways to use regular expressions in a count query, but that is kinda tricky to find so this is what I was able to come up with….

So let’s say you had a table where you were attaching the landing url a site visiting is entering your website on, and you wanted to track that landing url the whole way to the end of some web based procedure. Of course certain urls will be different but some could be common for the purpose of counting them together on a report. In a practical example, lets say you are doing pay-per-click traffic with Google and Yahoo. Both of these providers use unique ids in the url to help distinguish between multiple clicks from the same person (so you end up with many urls that are different but mean the same thing). And of course you were a good little developer when you decided to send Google traffic to /google/ and Yahoo to /yahoo/!
Continue reading ‘Counting items with mysql and regex in the group by statement’

And we are back.

So it has been quite some time since I posted on here.  It has been rough lately. Not sure what kind of funk I’ve been in… but actively trying to get out of it. Hoping getting back in tune with the tubes will help. (Twitter is probably the biggest reason not to post on here…damn you Twitter)

While I have been gone I have been doing some work with CakePHP, FAI – fully automatic linux installations, VirtualBox & VMware, Magento, etc. So I have been keeping pretty busy.

I also found a nice little hardware project that has just come into my radar. This is something that I have been wanting to work on in my *cough* free time. However my vision would be to use a host computer for all the logic and user control, and the controller board used for simple I/O. Anyone interested in this, drop a comment and let me know.