Skip to content
Snippets Groups Projects
Commit 460cc216 authored by Magali Ruffier's avatar Magali Ruffier
Browse files

added method to fetch results from the attribute_type table, without value attached

uses code to fetch result
parent 59b52945
No related branches found
No related tags found
No related merge requests found
......@@ -394,6 +394,24 @@ sub fetch_all {
throw("Use of method fetch_all not supported for attributes");
}
sub fetch_by_code {
my ($self, $code) = @_;
my $sql = "SELECT attrib_type_id, code, name, description " .
"FROM attrib_type
WHERE code = '$code' ";
my $sth = $self->prepare($sql);
$sth->execute();
my ($attrib_type_id, $name, $desc);
$sth->bind_columns(\$attrib_type_id, \$code, \$name, \$desc);
my @results = $sth->fetchrow_array;
$sth->finish();
return \@results;
}
sub fetch_all_by_Object {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment