rlb3 has asked for the wisdom of the Perl Monks concerning the following question:
I get theses errors:package Library::Data::Base; use strict; use warnings; use Class::DBI::AbstractSearch; use base qw(Class::DBI::Pg); __PACKAGE__->set_db(Main => 'dbi:Pg:dbname=library;host=10.0.0.1, ‘user’, ‘pass’,{AutoCommit + => 1}); package Library::Data::Res; use strict; use warnings; use base qw( Library::Data::Base ); __PACKAGE__->set_up_table('res'); package WebApp; use strict; use warnings; use Library::Data::Res; my @results = Library::Data::Res->search_where( information_type => \@info +_type, format => \@form +ats, starting_point => \@topi +cs );
I’m not exactly sure what I’m seeing here. It looks as if either its adding an extra AND or its leaving out one of the fields it should be searching on. This is the first time I’m trying to use Class::DBI::AbstractSearch so I could be doing something very wrong. Anyway, thanks for the help.[Tue Apr 6 15:46:33 2004] [error] Library::Data::ResLibrary::Data::Re +s can't SELECT id FROM res WHERE ( ( ( format = ? ) ) AND AND ( ( starting_point = ? ) ) ) : DBD::Pg::st execute failed: ERROR: syntax error at or near "AND" at character 126 [for Statement "SELECT id FROM res WHERE ( ( ( format = ? ) ) AND AND ( ( starting_point = ? + ) ) ) "] at /usr/lib/perl5/site_perl/5.8.1/Ima/DBI.pm line 714. errDBD::Pg::st execute failed: ERROR: syntax error at or near "AND" a +t character 126 [for Statement "SELECT id FROM res WHERE ( ( ( format = ? ) ) AND AND ( ( starting_point = ? + ) ) ) "] at /usr/lib/perl5/site_perl/5.8.1/Ima/DBI.pm line 714. at /usr/lib/perl5/site_perl/5.8.3/Class/DBI/AbstractSearch.pm line 26
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problems with Class::DBI::AbstractSearch
by jdtoronto (Prior) on Apr 07, 2004 at 03:15 UTC | |
|
Re: Problemns with Class::DBI::AbstractSearch
by matija (Priest) on Apr 06, 2004 at 21:05 UTC | |
|
Re: Problems with Class::DBI::AbstractSearch
by simonm (Vicar) on Apr 07, 2004 at 16:33 UTC |