Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: the multiple thread port scanner scripts issue

by roboticus (Chancellor)
on Jan 26, 2013 at 14:34 UTC ( #1015493=note: print w/ replies, xml ) Need Help??

in reply to the multiple thread port scanner scripts issue


The reason that the date isn't being updated in your database is because you're not telling it to do so. I'd change your update statement from:

my $upd_sth = $dbh->prepare("update psinfo set port=\'$myport\' where +domainname=\'$line\'"); $upd_sth->execute() or die "unable to execute update line where name i +s $line! error $DBI::errstr";

to something like this:

my $upd_sth = $dbh->prepare(q{ update psinfo set port=?, last_checked=getdate() where domainname=? }); $upd_sth->execute($myport, $line) or die "unable to update: name=$line! error\n$DBI::errstr\n";

Note: I don't recall the method to get the current date/time in MSSQL, so I just guessed. I also converted your code to use placeholders, because:

  • they're safer,
  • they're easy to use
  • they make the SQL more readable (in my opinion)

I'm sorry, but I can't quite make out all of your question, nor can I make much sense from your code, so that's about all I can offer for now.


When your only tool is a hammer, all problems look like your thumb.

Comment on Re: the multiple thread port scanner scripts issue
Select or Download Code
Replies are listed 'Best First'.
Re^2: the multiple thread port scanner scripts issue
by jeremy.fang (Initiate) on Jan 28, 2013 at 07:13 UTC
    thanks your reply
    can you added the thread into the scripts

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1015493]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2015-10-06 21:10 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (160 votes), past polls