Rachel has asked for the wisdom of the Perl Monks concerning the following question:
Content-type: text/html <!-- warning: DBD::ODBC::db prepare failed: [Microsoft][ODBC Microsoft + Access Driver] Syntax error (missing operator) in query expression ' +ResourceSettings.ResID=Resources.ResID and () if ()'. (SQL37000)(DBD: st_prepare/SQLPrepare err=1) { +SELECT ResType, ResLevel, ResManage, Details, Length, Source, Cost, F +urtherDetails FROM ResourceSettings, Resources WHERE ResourceSettings.ResID=Resources.ResID and () if () ORDER BY ResType, ResLevel, ResManage, Details, Length, Source, Cost, FurtherDetails} at c:\I +NDIGO~1\CGIBIN\DRIVE2.PL line 46. --> <H1>Software error:</H1> <PRE>No sth: ''No such file or directory at c:\INDIGO~1\CGI-BIN\DRIVE2 +.PL line 46. </PRE> <P> For help, please send mail to the webmaster (<a href="mailto:you@your. +address">you@your.address</a>), giving this error message and the time and date of the error.
Any feedback would be greatly appreciated.my $hash ={ Initiative=>'DriveInitiative', ResOrientation => 'DriveResOrient', Creativity => 'DriveCreativity', ChangeOrientation => 'DriveChangeOrient', DecisionMaking => 'DriveDecisionMake', SelectLevel => 'ResLevel', ManagesPeople => 'ResManage'}; my @clauses = (); foreach my $checkbox (keys %$hash) { push @clauses, $hash->{$checkbox} if validate($cgi->param($chec +kbox)); } my $where_clause = join(' and ',map($_.= ' = "on"', @clauses)); my $sql = "SELECT ResType, ResLevel, ResManage, Details, Length, S +ource, Cost, FurtherDetails FROM ResourceSettings, Resources WHERE ResourceSettings.ResID=Resources.ResID and ($where_clause) if ($where_clause) ORDER BY ResType, ResLevel, ResManage, Details, Length, Source, Cost, FurtherDetails";
update (broquaint): title change (was RE. My earlier checkbox question(s)!)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: RE. My earlier checkbox question(s)!
by UnderMine (Friar) on Nov 23, 2002 at 13:52 UTC | |
by Rachel (Acolyte) on Nov 23, 2002 at 14:33 UTC | |
by rdfield (Priest) on Nov 26, 2002 at 11:35 UTC | |
by Rachel (Acolyte) on Nov 27, 2002 at 09:19 UTC | |
by rdfield (Priest) on Nov 27, 2002 at 09:42 UTC |