Forums Index > Mewsoft Products > Searchawy > sql command on Cat_ID
marty First Post Posted on: 03-14-13 11:54 PM
sql command on Cat_ID

Is it possible to delete a main category with a sql command that would also delete all its sub categories, if so what what command would that be ?\ \ DELETE From Directories Select Cat_ID = xxxxx ?\ DELETE From Directories_Name Select Cat_ID = xxxxx ?\ \ Like would deleting a main category delete its sub cats as well ? \ \ Any advice on doing this please, I need to delete my Cat's down to a respectable level.\ \ Marty
mewsoft Reply #: 1 Posted on: 03-15-13 01:34 AM
Re: sql command on Cat_ID

When you delete a category from the admin->category manager, it deletes all its sub categories tree automatically.

Mewsoft Support
www.mewsoft.com

marty Reply #: 2 Posted on: 03-15-13 01:45 AM
Re: sql command on Cat_ID

\ \ \ \ \
\ \ \ \ \ \ \ \
mewsoft's Wrote:
When you delete a category from the admin->category manager, it deletes all its sub categories tree automatically.
\
\ \ I understand what your saying, but unfortunately the Cat's list is so big I cant do that, it hangs (times out). Thus I didn't want to try the above etc..\ \ I don't mind if the sub cats are still listed in the mysql database, I just didn't want the system to try and read them.\ \ Would the above command help out with load times.\ \ Basically I dont want or need 2+ million links, thus that will reduce my Cat's by two hundred thousand.
mewsoft Reply #: 3 Posted on: 03-15-13 11:24 AM
Re: sql command on Cat_ID

You can run any lengthy commands from telenet, anyway, the commands you asked:

    DELETE FROM DirCategories WHERE Cat_ID=xxxx
    DELETE FROM DirCategories_Name WHERE Cat_ID=xxxx
    DELETE FROM DirCategories_Description WHERE Cat_ID=xxxx
    DELETE FROM DirCategories_Meta WHERE Cat_ID=xxxx


Mewsoft Support
www.mewsoft.com

marty Reply #: 4 Posted on: 03-15-13 11:55 AM
Re: sql command on Cat_ID

Thank you...