this is a test code. it has all the hallmarks of code that I wrote about 5 years ago. How cute.

here it comes….

     function fetch($cols='', $kids=false, $get_images=false)
     {
         $info = parent::fetch($cols, $kids);
         if ($get_images) {
             $info['images'] = $this->get_images();
         }
         return $info;
     }
     function fetch_product_categories($level = null)
     {
         $sql = "SELECT c.id, c.name FROM {$this->_category_map_table} pc, {$this->_category_table} c
                 WHERE pc.cm_categories_id = c.id AND pc.cm_products_id = " . $this->get_id();
         if ($level) $sql .= " AND c.level = $level";
         return $this->db->getAll($sql);
     }

and that was that. The highlighting was a cinch to set up thanks to the wp-syntax plugin.

Leave a Comment