Should work with this:
check_if_title_exists
my $cond = new GT::CGI::Condition;
$cond->add('Title','=',$_[0]);
$cond->add('URL','=',$_[1]);
$cond->bool('OR');
if ($DB->table('Links')->count( $cond ) > 0) {
return { title_exists => 1 }
} else {
return { title_exists => 0 }
}
}
<%if title_exists%> the title exists <%else%> it doesnt exist <%endif%>
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
check_if_title_exists
Code:
sub { my $cond = new GT::CGI::Condition;
$cond->add('Title','=',$_[0]);
$cond->add('URL','=',$_[1]);
$cond->bool('OR');
if ($DB->table('Links')->count( $cond ) > 0) {
return { title_exists => 1 }
} else {
return { title_exists => 0 }
}
}
Code:
<%check_if_title_exists($Title,$URL)%> <%if title_exists%> the title exists <%else%> it doesnt exist <%endif%>
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!