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

Products: Gossamer Links: Development, Plugins and Globals: Re: [Hargreaves] Help making global: Edit Log

Here is the list of edits for this post
Re: [Hargreaves] Help making global
Hi,

Not nit-picking, but... that will probably give an error; (didn't test it, but from previous globals, where I left this out by mistake, it gave syntax errors);

Code:
return $table->select('payments_amount' => $cond)->fetchrow;

...should be wrapped with { }

Code:
return $table->select( { 'payments_amount' => $cond } )->fetchrow;


Also, you need to specify what to grab.. i.e;

Code:
return $table->select( ['payments_amount'] , { 'payments_amount' => $cond } )->fetchrow;


Actually.. thinking about it, this may be better;


Code:
sub {
my $table = $DB->table('Payments');
$table->select_options("ORDER BY payments_amount","LIMIT 1");
return $table->select( ['payments_amount'] , { payments_linkid => $_[0] } )->fetchrow;
}

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!

Last edited by:

Andy: Dec 7, 2005, 10:06 AM

Edit Log: