Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [nir] is Title exist

Quote Reply
Re: [nir] is Title exist In reply to
Should be pretty simple:

check_if_title_exists
Code:
sub {
if ($DB->table('Links')->count( { Title => $_[0] } ) > 0) {
return { title_exists => 1 }
} else {
return { title_exists => 0 }
}
}

Then call with:

Code:
<%check_if_title_exists($Title)%>
<%if title_exists%> the title exists <%else%> it doesnt exist <%endif%>

Cheers

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!
Subject Author Views Date
Thread is Title exist nir 2346 Dec 20, 2009, 6:05 AM
Thread Re: [nir] is Title exist
Andy 2290 Dec 20, 2009, 6:15 AM
Thread Re: [Andy] is Title exist
nir 2269 Dec 20, 2009, 6:20 AM
Thread Re: [nir] is Title exist
Andy 2283 Dec 20, 2009, 6:26 AM
Post Re: [Andy] is Title exist
nir 2261 Dec 21, 2009, 12:30 AM