Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Deleting everything except the categories

Quote Reply
Deleting everything except the categories
Hi does anybody know how I can delete all links, votes for links etc from the database and leave the categories intact ?

I want to keep template globals and user language.

Thanks, Jag

PS at the moment I have deleted all links, I only had a few, and one still appears as a link in the directory and creates page display problems (page is diaplayed up to link part and then no more code), even though I deleted it Frown.
Significant Media

Last edited by:

Jag: Aug 26, 2004, 9:51 AM
Quote Reply
Re: [Jag] Deleting everything except the categories In reply to
In MySQLMonitor;

Code:
DELETE FROM lsql_Links;
DELETE FROM lsql_CatLinks;
UPDATE lsql_Category SET Number_of_Links = '0';

...and then run "Repair Tables" in your LSQL admin panel.

Please be sure that you have the names of the tables right... just in case you delete something you didn't want to =)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Deleting everything except the categories In reply to
Andy

Once again thanks? I got mixed up and was trying to get it to run in "SQL Monitor" (link on the left hand side in MySQL admin) when you were talking about "SQL Monitor in MySQLMan". The first gave me an error say the syntax wasn't correct whereas it ran fine in "SQL Monitor in MySQLMan".

The links have disappeared and there is no discrepancy but I have this weird problem that neither the name or description of the first link I query in the basic search appear in results. I just get no results !
If I put the country name that appears in the description then that appears as a category. but nothing from the link.
This already happened before I did what you suggested, so it's not a side effect. I thought cleaning it all out would be good and would solve this and other problems.

But doesn't seem to have solved the problem of the search finding data.

Jag
Significant Media
Quote Reply
Re: [Jag] Deleting everything except the categories In reply to
Quote:
The first gave me an error say the syntax wasn't correct whereas it ran fine in "SQL Monitor in MySQLMan".

Yeah.. thats a bug in running multiple commands in MySQLMonitor :(

Quote:
But doesn't seem to have solved the problem of the search finding data.

What indexing method are you using for the category table? Doulbe check it in Database > Category > Properties, and then its at the bottom of the page.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Deleting everything except the categories In reply to
Andy,

Nice one, you were right !

But I don't get why : in effect the scheme was set to MySQL (since that was what I'm using). I changed it to NONINDEXED and "voilą" all the results appeared.

How come ???

Since I'm using MySQL as my database, what's going on or rather am I doing something wrong ?

Thanks, John
Significant Media
Quote Reply
Re: [Andy] Deleting everything except the categories In reply to
In Reply To:
What indexing method are you using for the category table? Doulbe check it in Database > Category > Properties, and then its at the bottom of the page.
Andy, I tried using all of the indexing methods in the dropdown (from above) and my searches from Database > Links > Search give me
Your search did not match any records.

If I search for ID, Title, etc.(in the main admin page) I get nothing. I get no results from a catergory search, either. The only place I get a search result from is a keyword search at the bottom of the page and if I put the ID in the third box in the left nav from the Database admin page, the search gives me the correct results??

Thanks in advance for the help.

Last edited by:

Andy: Aug 31, 2004, 12:01 AM
Quote Reply
Re: [Jag] Deleting everything except the categories In reply to
Quote:
But I don't get why : in effect the scheme was set to MySQL (since that was what I'm using). I changed it to NONINDEXED and "voilą" all the results appeared.

It could have been that you didn't reindex the search tables;

perl nph-index.cgi --reindex

..can take a while =)

Quote:
Since I'm using MySQL as my database, what's going on or rather am I doing something wrong ?

Try going into SSH/Telnet, and typing this;

Code:
cd /path/to/your/admin
perl nph-index.cgi --change-driver=MYSQL
perl nph-index.cgi --reindex

(you *may* not have to do the second command... as I believe its run with the --change-driver part).

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [junior_33] Deleting everything except the categories In reply to
Hi,

In Reply To:
Andy, I tried using all of the indexing methods in the dropdown (from above) and my searches from Database > Links > Search give me
Your search did not match any records.

If I search for ID, Title, etc.(in the main admin page) I get nothing. I get no results from a catergory search, either. The only place I get a search result from is a keyword search at the bottom of the page and if I put the ID in the third box in the left nav from the Database admin page, the search gives me the correct results??

Thanks in advance for the help.

Please see my last post (above this one). Hopefully that will explain how to set it up, so that you get search results :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Deleting everything except the categories In reply to
I tried this out and as you can see, the commands work but I have an error. It seems that the multilanguage plug-in that I'm not actually using yet but that is installed is creating problems. I attached a file for the output since it is quite a long verbose output.

I think one of the names created by the plugin is creating issues for MYSQL.

I think I'm going to have to get GT staff to look at this ! (If I have understood what is going on). Unsure

John

PS : since I changed over the results from both categories and descriptions dont appear, which seems logical in view of the attached verbose.
Significant Media

Last edited by:

Jag: Aug 31, 2004, 8:28 AM
Quote Reply
Re: [Jag] Deleting everything except the categories In reply to
No idea Unsure

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!