Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Selection Criteria for global

Quote Reply
Selection Criteria for global
Hi,

I'm looking for some help with a global I've cobbled together using other posts in the forum.

It selects DISTINCT vehicle manufacturers from the 'Salvage' database and orders them by the field 'Make'.

I'd like to add a second condition so that it will only select distinct manufacturers from records where the field "List" equals 'Y'?


sub {
my $db = $DB->table('Salvage');
$db->select_options('ORDER BY Make');
my $results = $db->select(['DISTINCT Make'])->fetchall_hashref;
return { loop_select => $results };
}

I basically want to add AND List like 'Y' to the select, but whatever I try seems to break it.

Any help appreciated Smile

All the best
Shaun
Subject Author Views Date
Thread Selection Criteria for global qango 3372 Mar 3, 2004, 4:53 AM
Thread Re: [qango] Selection Criteria for global
604 3284 Mar 4, 2004, 9:56 AM
Post Re: [TheStone] Selection Criteria for global
qango 3277 Mar 5, 2004, 4:09 AM