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
All the best
Shaun
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

All the best
Shaun