Welcome
Welcome to my homepage.
Visit http://www.trainquil.com/ to see all about our online training.
Visit my Portfolio page to see some examples of my work.
If you are one of my students, please visit the SLCC area for documents.
Thanks for visiting!
brett at brettevanson dot com
Group By, Order By, and Limit
So I had a question while optimizing some Mysql queries. What is the right order for the 3 commands I needed in this query: GROUP BY, ORDER BY, and LIMIT?
MySQL query optimization - indexing
Well, in school we talked so much about tuning, I even took a class that devoted part of it to MySQL tuning, but I had yet to see a need for it until today. We have a site that wanted an area to each video page that pulled in content like Amazon.com. We titled the area "People who viewed this also viewed" and we were pulling in content that was seen by other users and highly rated. So, here's the sql I came up with:
SELECT path, COUNT(path) as count FROM accesslog WHERE uid IN (SELECT uid FROM accesslog WHERE path='*****' AND uid !=0) GROUP BY path ORDER BY count
Add a visitor's IP address to the theme layer
I had a client ask me to put the visitor's IP address onto the page, and here's the process I went through to do it:
ExpFiltFix / spviewfix
Submitted by brett on Tue, 04/29/2008 - 10:58.This is based off this page http://drupal.org/node/138374 where everyone wanted checkboxes instead of a multi select for exposed filters. I have some custom stuff in there, too.
I'm also putting the spviewfix module on, as it is similar in that id modifies the exposed filters to checkboxes for a specific view. If someone really wants this, we could make an admin interface to tell it what view to do it on.
Type Search
Submitted by brett on Tue, 04/29/2008 - 10:53.After reading over http://drupal.org/node/68571 I decided to write a module for use with a client project. So, here's a module that provides a single block with a search form you can filter by a content type.
DrupalCon Boston 2008
I am in Boston this week at a Drupal conference. I am attending tons of sessions and learning all sorts of awesome stuff, and blogging about it (sometimes just dumping my notes) at http://drupalcon.brettevanson.com
Please go comment if you are there or have questions.
