perlaspirant has asked for the wisdom of the Perl Monks concerning the following question:
hi all,
I have created a table with 7 columns in the database, and i need to display that in front end. When i tried to populate the value in the front end table usingsub service{ $self->{service} = Bugzilla->dbh->selectall_arrayref( 'SELECT servicenow, Task_Type, Short_Description, Customer, +Priority, Assignment_Group,Assignment_ID FROM service_now where bug_i +d=237177'); return $self->{service};}
Here service is a subroutine
Bugzilla is using standard DBI functions to interact with the database, through Bugzilla->dbh.its displaying the reference and when i tried to dereference it, displays nothing or error as invalid token for $ symbol.
I am calling that inside the HTML file [% bug.service FILTER none %] -> this displays reference [% $bug.service FILTER none %] -> gives error as $ invalid token.
Can we use anyother method instead of selectall_arrayref(). Pls suggest me.Thanks in advance
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: need help in accessing sql table
by kcott (Archbishop) on Nov 05, 2013 at 06:58 UTC | |
|
Re: need help in accessing sql table
by marinersk (Priest) on Nov 05, 2013 at 18:37 UTC |