Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Getting a field as a variable...

Quote Reply
Getting a field as a variable...
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? Unimpressed

I've worked my wayt through the documentation to get as far as this..but I'm lost now Tongue

Thanks

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; hot thread Getting a field as a variable... Andy 5622 Jun 18, 2002, 5:33 AM
Thread; hot thread Re: [Andy] Getting a field as a variable...
yogi 5479 Jun 18, 2002, 5:57 AM
Thread; hot thread Re: [yogi] Getting a field as a variable...
Andy 5476 Jun 18, 2002, 6:39 AM
Thread; hot thread Re: [Andy] Getting a field as a variable...
yogi 5485 Jun 18, 2002, 6:43 AM
Thread; hot thread Re: [yogi] Getting a field as a variable...
Andy 5494 Jun 18, 2002, 6:45 AM
Thread; hot thread Re: [Andy] Getting a field as a variable...
yogi 5489 Jun 18, 2002, 6:49 AM
Thread; hot thread Re: [yogi] Getting a field as a variable...
Andy 5471 Jun 18, 2002, 7:02 AM
Thread; hot thread Re: [Andy] Getting a field as a variable...
Paul 5519 Jun 18, 2002, 7:12 AM
Thread; hot thread Re: [Paul] Getting a field as a variable...
Andy 5548 Jun 18, 2002, 7:17 AM
Thread; hot thread Re: [Andy] Getting a field as a variable...
Paul 5417 Jun 18, 2002, 7:31 AM
Post; hot thread Re: [Paul] Getting a field as a variable...
Andy 5382 Jun 18, 2002, 7:34 AM