          WHERE mac_item_brands.item_no = mac_catalog.item_no) brand,
        product_title,
        description,
-       REPLACE(REPLACE(LOWER(product_title), '&', 'and'), ' ', '-') slug,
+       slug(product_title),
        large_480,
        item_no
   FROM mac_catalog

-- Load the catalog
TRUNCATE TABLE mac_catalog;
LOAD DATA LOCAL INFILE 'Gen_Catalog.txt'

                  WHERE parent IS NULL
                    AND name = chapter) dept,
                category,
                slug(category),
                0
  FROM mac_catalog
 WHERE category != '';
