I built it using CodeIgniter, and wasn't as proficient in PHP as I am now. CI is a beginner framework and doesn't teach a lot of good practices (e.g. it loads external classes as singletons and uses a class loading script developed during the PHP4 days).
Here is the suggested CI method for executing database queries: http://codeigniter.com/user_guide/database/examples.html
Nowadays, I prefer (PHP) frameworks with real autoloaders and better OOP usage (like Zend or Kohana).