[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

SQL and Perl


I have a question related to SQL in combination with Perl, and would greatly appreciate if you take some time to read and reply.

A serious issue arose, to delete a significant amount of data from some forum. Its moderators, who will actually do the job, will greatly appreciate my help, since I want to reduce the time it would take. There are over 400 threads that have to be deleted entirely (a), and there are also over 800 threads (b) in which specific records have to be deleted (over 2,000 such records in total).

I compiled a list of threads (a) and a list of threads (b). For each, I wrote a Perl script that reads and stores each object's name and number in a variable, one at a time. Threads are referred to by their IDs assigned during their creation, and records are referred to by their count numbers. This information could have been useful for deleting data from the forum's database if only a delete function was added.

The forum uses SQL to store contents of threads and records, and Perl CGI scripts to post, retrieve and display it for visitors. Moderators also use GUI functions, which are actually written in Perl, to delete particular data.

My questions are:

1) What SQL commands are used for deleting threads entirely?
2) What SQL commands are used for deleting specific records in a thread?
3) How can those commands be run from within a Perl script mentioned

Thank you very much for your support in regards to that matter!

Reply to: