Blog
Developers
Careers
Support
Contact
Gossamer Threads
Solutions
Results
About
Mailing Lists
Resource Centre
Forum
Tools
Home
Who's Online
Tags
Favourites
Login
Forum Search
(
Advanced Search
)
This forum
This category
All forums
for
Home
:
Products
:
Gossamer Links
:
Discussions
:
delete link
Previous Thread
Next Thread
Print Thread
View Threaded
Oct 6, 2010, 5:24 AM
nir
User
(396 posts)
Oct 6, 2010, 5:24 AM
Post #1 of 8
Views: 4305
Shortcut
delete link
I want to delete column by global, I try this one and it not work,
sub {
$DB->table('Links')->delete( { ID => $_[0] } );
}
Any suggestion?
Oct 6, 2010, 5:38 AM
Andy
Veteran
/ Moderator
(18436 posts)
Oct 6, 2010, 5:38 AM
Post #2 of 8
Views: 4214
Shortcut
Re: [nir] delete link
In reply to
Hi,
You want to delete a column, or a who link?
How are you calling this global?
You would need to do it like:
Code:
<%global_name($ID)%>
..for the global you posted to work.
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!
Oct 6, 2010, 5:53 AM
nir
User
(396 posts)
Oct 6, 2010, 5:53 AM
Post #3 of 8
Views: 4212
Shortcut
Re: [Andy] delete link
In reply to
I call to it like you mention. But I get error
Undefined subroutine &sub { $DB->table('Links')->delete( { ID => $_[0] } ) || return $GT::SQL::error; return; } called at GT::Template::_call_func line 810.
Last
edited
by:
nir
: Oct 6, 2010, 5:54 AM
Oct 6, 2010, 5:56 AM
Andy
Veteran
/ Moderator
(18436 posts)
Oct 6, 2010, 5:56 AM
Post #4 of 8
Views: 4218
Shortcut
Re: [nir] delete link
In reply to
What is the ACTUAL global you are using, and exactly how are you calling it?
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!
Oct 6, 2010, 6:20 AM
nir
User
(396 posts)
Oct 6, 2010, 6:20 AM
Post #5 of 8
Views: 4214
Shortcut
Re: [Andy] delete link
In reply to
This is the global
sub {
$DB->table('Links')->delete( { ID => $_[0] } ) || return $GT::SQL::error;
}
<%Delete_ID($ID)%>
Oct 6, 2010, 6:24 AM
Andy
Veteran
/ Moderator
(18436 posts)
Oct 6, 2010, 6:24 AM
Post #6 of 8
Views: 4231
Shortcut
Re: [nir] delete link
In reply to
Mmm weird - and you get that error?
Undefined subroutine &sub { $DB->table('Links')->delete( { ID => $_[0] } ) || return $GT::SQL::error; return; } called at GT::Template::_call_func line 810.
???
Seems odd - that global + the way its setup all looks fine ot me :/
Are you sure you dont have any extra spaces at the beginning and end of the code?
i.e you dont have:
Code:
sub {
or
Code:
}
(i.e extra spaces where there shouldn't be)
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!
Oct 6, 2010, 6:37 AM
nir
User
(396 posts)
Oct 6, 2010, 6:37 AM
Post #7 of 8
Views: 4197
Shortcut
Re: [Andy] delete link
In reply to
Thanks, It was the extra space
Oct 6, 2010, 6:40 AM
Andy
Veteran
/ Moderator
(18436 posts)
Oct 6, 2010, 6:40 AM
Post #8 of 8
Views: 4199
Shortcut
Re: [nir] delete link
In reply to
haha cool =) Never seen that error (normally its different to that message) .. glad that fixed it though ;)
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!
Previous Thread
Next Thread
Print Thread
View Threaded