I'm trying to call a global, so it returns true if an entry exists with certain details, but it doesn't seem to be working very well
The global is:
# this is where we decide if a category is new or not...
my $ID = shift;
my $table = $DB->table('Category');
my $exists = $table->count( { Has_New_Links => "Yes", ID => $ID } );
if ($exists) { return 1; }
}
The tag I am using is;
<%if _has_new_links(8) == 1%>new<%endif%>
also tried;
<%if _has_new_links(8) eq "1"%>new<%endif%>
<%if _has_new_links(8)%>new<%endif%>
If I print out the tag, i.e;
<%_has_new_links(8)%>
...i tshows up as I would expect; 1 for links that the value is true on, and 0 for calls where it is not true.
I'm assuming this feature is supported in LSQL?
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!

The global is:
Code:
sub { # this is where we decide if a category is new or not...
my $ID = shift;
my $table = $DB->table('Category');
my $exists = $table->count( { Has_New_Links => "Yes", ID => $ID } );
if ($exists) { return 1; }
}
The tag I am using is;
<%if _has_new_links(8) == 1%>new<%endif%>
also tried;
<%if _has_new_links(8) eq "1"%>new<%endif%>
<%if _has_new_links(8)%>new<%endif%>
If I print out the tag, i.e;
<%_has_new_links(8)%>
...i tshows up as I would expect; 1 for links that the value is true on, and 0 for calls where it is not true.
I'm assuming this feature is supported in LSQL?
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!