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)!)
In reply to CGI/HTML checkboxes to SQL query by Rachel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |