OTRS using Mysql Query -
hi follow otrs developer manual using sql queries inside modules.
i run following query first value result.
$sql = "select id roles "; $self->{dbobject}->prepare(sql => $sql, limit => 15); @row = $self->{dbobject}->fetchrowarray(); if check size of @row array 1 in reality have many roles created in roles table.
can 1 tell me whats missing ?
i can't add code snippet in comment other answer here goes; fetchrowarray() return list of columns 1 row of result, you'd have iterate on below; pointed out. , if want add results array, use push.
$self->{dbobject}->prepare( sql => "select id table", limit => 10 ); @ids; while ( @row = $self->{dbobject}->fetchrowarray() ) { push @ids, $row[0]; }
Comments
Post a Comment