delete

Post Reply
User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

delete

Post by Thunderstone »



I understand that it is possible to run the following commands

gw -s "delete from html where Url like '/www.mysite.com/testdir'"
gw -s "delete from refs where Url like '/www.mysite.com/testdir'"

Also this command

/gw -st "delete from options where Name='URL' and String='THEBADURL'"


Is it possible to execute a delete command from the html and refs tables
where a word is found in the indexed TEXT of the entry, rather than the URL?




Mike Clark
super@101super.com
Tel/Fax 808 982 6463



User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

delete

Post by Thunderstone »



This will delete from html
gw -s "delete from html where Title\Meta\Body like 'your_terms'"
but to also delete related urls from refs, you will need to write
a small vortex script to delete each url that is found in html

..
<sql row "delete from html where Title\Meta\Body like 'your_terms'">
<sql novars "delete from refs where Url=$Url"></sql>
</sql>
..

Always make sure you do a select beforehand so that you know you
are deleting the correct urls. There is no undelete.



Post Reply