Ok..this is probably easy for most people..but this is the first plugin I have attempted to write that grabs some data from the SQL database ;)
What I am trying to do is grab the URL for a link, where the ID is equal to $id.
# connect to MySQl, so we can get the URL...
my $db = new GT::SQL '';
my $table = $db->table ('Links');
my $sth = $db->select ( { ID => \"$id" } );
I've got as far as the code above, but now I'm stuck as to how to get the field 'URL' returned into a variable that I am use elsewhere....can someone help me here please?
I've worked my wayt through the documentation to get as far as this..but I'm lost now
Thanks
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
What I am trying to do is grab the URL for a link, where the ID is equal to $id.
# connect to MySQl, so we can get the URL...
my $db = new GT::SQL '';
my $table = $db->table ('Links');
my $sth = $db->select ( { ID => \"$id" } );
I've got as far as the code above, but now I'm stuck as to how to get the field 'URL' returned into a variable that I am use elsewhere....can someone help me here please?
I've worked my wayt through the documentation to get as far as this..but I'm lost now
Thanks
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates

