phimtau123 has asked for the wisdom of the Perl Monks concerning the following question:
sub Scan_File { my ($variables) = @_; my $dbh = DBI->connect('DBI:ODBC:mwalarm') or die "Couldn't connect to database: " . DBI->errstr; my $sql = "INSERT INTO Alarm_Info(EquipmentID, Chamber, LotID, Waf +er_Flow, Recipe, Wafer_Slot, Step_Value, AlarmType, Sensor, Signal_Level, Alarm_Upper_Limit, Alarm_Lowe +r_Limit, Code, Date_Submited, Time_Submited, FilesName, UserCode) VALUES ('$eqpid', '$chamber', '$lotid', '$wafer_flow', '$reci +pe', '$wafer_slot', '$step_value', '$alarmtype', '$sensor', '$signal_level', '$alarm_upper_limit', '$alarm_low +er_limit', '$code', '$date_submited', '$time_submited', '$filenames', '$usercode')"; #sendToLog ($sql) ; my $sth = $dbh->prepare($sql) or print ERROR "Couldn't prepare statement: " . $dbh->errstr; if ($alarmtype =~ /Clear/i) { unlink "$scan_dir\\$filename" or print ERROR "can't unlink Cle +ar $scan_dir\\$filename $!\n"; }else { $sth->execute() or die "cant execute" . $dbh->errstr; $sth->finish; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SQL Insert Statement for date
by aquarium (Curate) on Jul 16, 2007 at 23:24 UTC | |
|
Re: SQL Insert Statement for date
by spatterson (Pilgrim) on Jul 17, 2007 at 15:31 UTC |