Tags:
create new tag
view all tags

SID-01173: DatabasePlugin - description field

Status: Answered Answered TWiki version: 4.1.2 Perl version: 5.8.8
Category: CategoryPlugins Server OS: Redhat (CentOS) 4.1.2-46, kernel 2.6.18-164.15.1.el5xen Last update: 14 years ago

I've recently installed the DatabasePlugin and am now attempting to display a table from a database. I think I may be misunderstanding the 'description' column, because when I use the following data structure:

$TWiki::cfg{Plugins}{DatabasePlugin}{Databases} =

[

{ description => 'bioref_compounds',

driver => 'mysql',

hostname => 'localhost',

database => 'biorefbank', sid => '',

username => 'twikiuser',

password => 'removed for this post',

table_name => 'chemical_data', },

];

With the query: %DATABASE_SQL{description="bioref_compounds" sql="SELECT * FROM chemical_data" format="| $Molecule_ID | $Name | $Date_Added |" header="| Molecule ID | Name | Date Added |"}%

I receive the following error message:

No such DB bioref_compounds at /usr/lib/perl5/5.8.8/CGI/Carp.pm line 314. at /usr/lib/perl5/5.8.8/CGI/Carp.pm line 314 CGI::Carp::realdie('No such DB bioref_compounds') called at /usr/lib/perl5/5.8.8/CGI/Carp.pm line 385 CGI::Carp::die('No such DB bioref_compounds') called at /www/lib/TWiki/Plugins/DatabasePlugin.pm line 95 eval {...} called at /www/lib/TWiki/Plugins/DatabasePlugin.pm line 94 TWiki::Plugins::DatabasePlugin::_dispatch('DATABASE_SQL', 'description="bioref_compounds" sql="SELECT * FROM chemical_da...') called at /www/lib/TWiki/Plugins/DatabasePlugin.pm line 117 TWiki::Plugins::DatabasePlugin::commonTagsHandler('| Molecule ID | Name | Date Added |\x{a}| [[BiorefBank][ | ...', 'BiorefBank', 'Main', 0) called at /www/lib/TWiki/Plugin.pm line 245 TWiki::Plugin::invoke('TWiki::Plugin=HASH(0x14444120)', 'commonTagsHandler', '| Molecule ID | Name | Date Added |\x{a}| [[BiorefBank][ | ...', 'BiorefBank', 'Main', 0) called at /www/lib/TWiki/Plugins.pm line 333 TWiki::Plugins::_dispatch('TWiki::Plugins=HASH(0x13e883e0)', 'commonTagsHandler', '| Molecule ID | Name | Date Added |\x{a}| [[BiorefBank][ | ...', 'BiorefBank', 'Main', 0) called at /www/lib/TWiki/Plugins.pm line 470 TWiki::Plugins::commonTagsHandler('TWiki::Plugins=HASH(0x13e883e0)', '| Molecule ID | Name | Date Added |\x{a}| [[BiorefBank][ | ...', 'BiorefBank', 'Main', 0) called at /www/lib/TWiki.pm line 2605 TWiki::handleCommonTags('TWiki=HASH(0x132a1050)', '| Molecule ID | Name | Date Added |\x{a}Searched: SEARCH{ "form.name...', 'Main', 'BiorefBank') called at /www/lib/TWiki/UI/View.pm line 375 TWiki::UI::View::_prepare('| Molecule ID | Name | Date Added |\x{a}

Number of topics: 0

SEARCH{ "form.name...', 'TWiki=HASH(0x132a1050)', 'Main', 'BiorefBank', 'TWiki::Meta=HASH(0x14858fb0)', 0) called at /www/lib/TWiki/UI/View.pm line 359 TWiki::UI::View::view('TWiki=HASH(0x132a1050)') called at /www/lib/TWiki/UI.pm line 159 TWiki::UI::__ANON__() called at /www/lib/CPAN/lib//Error.pm line 379 eval {...} called at /www/lib/CPAN/lib//Error.pm line 371 Error::subs::try('CODE(0x132a1020)', 'HASH(0x148723a0)') called at /www/lib/TWiki/UI.pm line 199 TWiki::UI::run('CODE(0x13329000)', 'view', 1) called at /www/bin/view line 31

The table chemical_data looks like this:

Molecule_ID Name Date_Added
2 Hydrogen Peroxide 2011-10-05
1 Water 2011-10-05

Thanks, Tom

-- ThomasSitter - 2011-05-12

Discussion and Answer

Hello.

I remember having problems when editing the DBI setting using the configure script. It was something related to an extra (or a missing) comma. I had to edit the LocalSite.cfg file in TWIKI_ROOT_PATH/lib.

Remove the two last commas in the definition of your database (in table_name => 'chemical_data', },) and try again.

-- EnriqueCadalso - 2011-05-14

Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the TWiki consultants if you need timely help. We invite you to get involved with the community, it is more likely you get community support if you support the open source project!

-- PeterThoeny - 2011-07-08

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Answered
Title DatabasePlugin - description field
SupportCategory CategoryPlugins
TWiki version 4.1.2
Server OS Redhat (CentOS) 4.1.2-46, kernel 2.6.18-164.15.1.el5xen
Web server Apache 2.2.3
Perl version 5.8.8
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2011-07-08 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.