can't delete from the html table

KMandalia
Posts: 301
Joined: Fri Jul 09, 2004 3:50 pm

can't delete from the html table

Post by KMandalia »

I want to delete about 70,000 entries from the database but the delete button in 'List/Edit URL' doesn't work.

Could you provide a way so that I can delete it from the command line,may be? (I guess it is not just html tables I would be deleting entries from)
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

can't delete from the html table

Post by mark »

Doesn't work in what way?

There are various discussions of deleting by hand using sql in this board. But basically

<$delthis="http://somesite/something%">
<sql novars "delete from html where Url matches $delthis"></sql>
<sql novars "delete from refs where Url matches $delthis"></sql>
KMandalia
Posts: 301
Joined: Fri Jul 09, 2004 3:50 pm

can't delete from the html table

Post by KMandalia »

Thanks.

I ran the script. It was very fast, I don't know if it did it or not (Can't check it from List/Edit URLS).

Question: Do have to reindex after running the script?

The page goes blank and you can see the status bar indicator moving a liitle bit, but it hangs up half way and even if I leave it as it is, it will stay there forever.

I always had that trouble whenever deleting more than 2-3K pages. After waiting for 5-10 mins, I would close the browser, but the deletion would work. In this case it is not working at all, hanging up and page timing out.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

can't delete from the html table

Post by mark »

Yes, the index should be updated, which list/edit does. You'll have to reindex if deleting by hand. Or create a new entry point for just updating. I believe that's discusses on the board somewhere already.
KMandalia
Posts: 301
Joined: Fri Jul 09, 2004 3:50 pm

can't delete from the html table

Post by KMandalia »

The delete didn't worked and my index crashed. I ran the following:

<script language=vortex>
<a name=main public>
<SQL "select String from options where Profile='topcuind' and Name='SS_db'"></sql>
<$deletethis="http://www.somesite.com%">
<sql novars "delete from html where Url matches $deletethis"></sql>
<sql novars "delete from refs where Url matches $deletethis"></sql>
</a>
</script>
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

can't delete from the html table

Post by John »

Did you set the database to the String you selected from options? Also what exactly do you mean by didn't work and crashed?
John Turnbull
Thunderstone Software
KMandalia
Posts: 301
Joined: Fri Jul 09, 2004 3:50 pm

can't delete from the html table

Post by KMandalia »

Yup, you are right. I missed that step. That would solve all my problems.

Actually, for immediate removal, I took the URL pattern I wanted to delete out of the category box and when I hit 'Update' and the next thing I know is 'No results matched the query' on search page. And every time I do reindex after recat, it gives the 'Sqlprepare() failed with -1...." error.

So, should I do remakeindex (becuase of ref) after I update and run my script or reindex is good enough?

What am I doing wrong?
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

can't delete from the html table

Post by mark »

View the source of the page saying no results to see if there are any error/warning messages inside html comments.

There's usually some other message along with sqlprepare failed that's more indicative of why. Remakeindex shouldn't be particularly different than reindex in this case. Recatting will also update the search index. Make sure you let recat finish before trying to update. Check the bottom of the walk status.
KMandalia
Posts: 301
Joined: Fri Jul 09, 2004 3:50 pm

can't delete from the html table

Post by KMandalia »

When doing any table modification, does taking a backup of live database (db1 or db2) is good enough if something goes wrong during deletion?
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

can't delete from the html table

Post by mark »

Yes as long as it's not being modified while you back it up and you backup the entire directory. If there is a SYSLOCKS file don't restore that when restoring the database.
Post Reply