In after this statement in the CGI that I described above:$db = new Win32::ODBC("$DSN"), if ($dept ='CA'){ if (!($db=new Win32::ODBC($DSN))) { print "Error connecting to Database\n"; print "Error: " . Win32::ODBC::Error() . "\n"; } $SqlStatement = "SELECT * FROM Pipeline WHERE Publish<='$tod +ay' AND Expiry>='$today' AND CA='Must Read'"; if ($db->Sql($SqlStatement)) { print "SQL failed.\n <br>$SqlStatement\n"; print "Error: " . $db->Error() . "\n"; } else { while($db->FetchRow()) { %Data = $db->DataHash(); print "<li><a href=\"http://wwwybs/ybsone/Pipeline/master/ +$folderday/$Data{'Ref'}\" target=\"main\"><strong><font face=\"Arial\ +">$Data{'Title'}</a></font>Theme: $Data{'Theme'}</li>"; } } $db->Close(); }
I just get compilation errors and random messages about syntax errors. Why?$cgi->p("$dept was received."),
In reply to Re^2: CGI executing a SQL statement
by kjg
in thread CGI executing a SQL statement
by kjg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |