Need help on adding multiple cats to directory

Discussion in 'Directories' started by jminscoe, Oct 26, 2008.

  1. #1
    I have a quick question I am rebuilding a directory and have a bunch of new Top categories then subcategories then more sub categories to add to them for instance
    Counties
    --Cities
    --- Business Categories

    is there an easy way to do it as right now I put the counties in then add the cities by way of the add subcategory button then I have to go to each city and add 65 more categories please does anyone have a suggestion that might work better
     
    jminscoe, Oct 26, 2008 IP
  2. mikey1090

    mikey1090 Moderator Staff

    Messages:
    15,869
    Likes Received:
    1,055
    Best Answers:
    0
    Trophy Points:
    445
    Digital Goods:
    2
    #2
    You could write the SQL code and just paste it each time, changing only the value for the parent category.
     
    mikey1090, Oct 26, 2008 IP
  3. jminscoe

    jminscoe Peon

    Messages:
    1,223
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #3
    but wouldn't the other category number change also for instance Parent Cat 5123 then Sub cat 5124 then 65 categories under the subcat and how would I go about writing it just pull phpld sql code and go from there or what as right now I have all the counties and cities in one text file and the other 65 categories in another text file
     
    jminscoe, Oct 26, 2008 IP
  4. mikey1090

    mikey1090 Moderator Staff

    Messages:
    15,869
    Likes Received:
    1,055
    Best Answers:
    0
    Trophy Points:
    445
    Digital Goods:
    2
    #4
    Assume you added UK > London to the database. London has the ID 15.

    You could write the SQL code to add your 65 standard categories with a parent ID of 15. Then your 65 categories would become sub-categories of London.
     
    mikey1090, Oct 26, 2008 IP
  5. jminscoe

    jminscoe Peon

    Messages:
    1,223
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #5
    ah ok I get it go ahead and add all the counties (top cats) and cities (sub cats) then add the 65 cats to the cities by way of a mysql thanks Mike tried to add rep but it said I had to pass some around first
     
    jminscoe, Oct 26, 2008 IP