Eliot,
Can you be more specific? I'd like to use this but I need to know what changes specifically, if any, must be made to make this compatible with SQL2.0.3?
Code:
# Check that the record hasn't been added already in the Links and Validate tables.
$val = new Links::DBSQL $LINKS{admin_root_path} . "/defs/Validate.def";
$val->query ( { Description => $in->param('Description'), URL => $in->param('URL'), Title => $in->param('Title'), ww => 1 } );
$db = new Links::DBSQL $LINKS{admin_root_path} . "/defs/Links.def";
$db->query ( { Description => $in->param('Description'), Title => $in->param('Title'), URL => $in->param('URL'), ww => 1 } );
if (($db->hits) and ($val->hits)) {
&site_html_error ( { error => "A request to add this record has been received. We will notify you via email when your link has been validated."}, $dynamic);
return;
}
if ($db->hits) {
&site_html_error ( { error => "Your link already exists in our database. To modify your link, please click on the Edit Link link located at the top and bottom of our web pages."}, $dynamic);
return;
}
if ($val->hits) {
&site_html_error ( { error => "A request to add this record has been received and your link has not been validated yet."}, $dynamic);
return;
}Mark Brasche
http://SurfSafely.com/