Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Dublicate checking upon adding

Quote Reply
Dublicate checking upon adding
hi there
i have tried the following code in add.cgi to prevent dublicate additions to the database.

# Check for duplicates..
my $url = $in->param('URL');
my $sth = $val->prepare ("SELECT ID FROM Links WHERE URL LIKE '$url_'");
$sth->execute();
if ($sth->rows) {
if ($in->param('CategoryID')) {
$name = &get_category_name ($in->param('CategoryID'));
$category = "$name <input type=hidden name='CategoryID' value='" . $in->param('CategoryID') . "'>";
}
else {
$category = &get_category_list();
}
return &site_html_add_failure( { error => "Duplicate URL",Category => $category, %in }, $dynamic);
}
The proble i am getting an error message upon callinbg add.cgi:
Software error:
Execution of add.cgi aborted due to compilation errors.

Can someone check it and tell me what is wrong?
Thanks

Abdoulrahman
Subject Author Views Date
Thread Dublicate checking upon adding katabd 3966 Nov 7, 2000, 12:46 PM
Thread Re: Dublicate checking upon adding
Stealth 3904 Nov 7, 2000, 2:58 PM
Thread Re: Dublicate checking upon adding
qango 3915 Nov 7, 2000, 4:08 PM
Thread Re: Dublicate checking upon adding
katabd 3908 Nov 7, 2000, 5:30 PM
Thread Re: Dublicate checking upon adding
Stealth 3923 Nov 7, 2000, 7:03 PM
Thread Re: Dublicate checking upon adding
katabd 3881 Nov 7, 2000, 7:49 PM
Post Re: Dublicate checking upon adding
qango 3874 Nov 8, 2000, 1:33 AM