Gossamer Forum
Quote Reply
Global Select question
Hi

I am trying to change a global so its templete can pass all the Links Fields:

Currently the select line reads:

my $sth ->select('Title', 'Hits', 'ID', 'Description', 'articles', {isValidated => 'Yes'});

Can that be changed so the templete associated with the global can accept all the Link Fields?

can that be done by simply removing all the My $sth line together?
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] Global Select question In reply to
Hi KaTaBd,

Try something like:

$tags = $sth ->select( {isValidated => 'Yes'} )->fetchrow_hashref;

Then you can call each field with $tags->{field}.

Laura.
The UK High Street
Quote Reply
Re: [afinlr] Global Select question In reply to
select() must be called using a table object not a statement handle.
Quote Reply
Re: [Paul] Global Select question In reply to
Oops - wasn't paying enough attention! I was trying too hard to use the same variable names in my reply as in the original postLaugh

If you have

my $db = $DB->table('Links');

then you need

my $tags = $db->select( { isValidated => 'Yes'} )->fetchrow_hashref;

(You could have just corrected me Paul Smile)
Quote Reply
Re: [afinlr] Global Select question In reply to
I thought perhaps it was just a confusing variable name so it was just a general comment not directed at anyone specifically Smile...ie the code could have been...

my $sth = $DB->table('Links');

$sth->select( 'ID' ... )->fetchrow_hashref;
Quote Reply
Re: [Paul] Global Select question In reply to
Yes - that could get really confusing!!
Quote Reply
Re: [Paul] Global Select question In reply to
Hi

The problem this Global is actually a Sub in a plug in PM file and the <fetchrow_hashref>> method can not be called...
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] Global Select question In reply to
>>
The problem this Global is actually a Sub in a plug in PM file and the <fetchrow_hashref>> method can not be called...
<<

Sorry I dont understand?