Re: date compare in sql ???

2002-12-26 Thread Tkil
|my $two_weeks_ago_iso = strftime '%Y-%m-%d %T', localtime $two_weeks_ago; Sigh. After the appropriate "use POSIX qw( strftime );" of course. t.

Re: date compare in sql ???

2002-12-26 Thread Tkil
Kris -- Note that this isn't strictly a perl nor dbi question. Haing said that, the most efficient way is probably to calculate the expiration time local to the perl script, then compare that constant against the db field. That is: |my $now = time(); |my $two_weeks_ago = $now - 14*24*6

Re: SOT: dereference(?) a single row (fetchall_arrayref)

2002-12-24 Thread Tkil
> "Roderick" == Roderick A Anderson <[EMAIL PROTECTED]> writes: [from previous message] Roderick> The problem I'm having is how to do in a one-liner the Roderick> equivalent of this. Getting the the $domainname_key out of Roderick> the arrayref $domain_array. Roderick> foreach my $row (@$do

Re: Here Document Problems

2002-10-18 Thread Tkil
> "Elio" == Elio Grieco <[EMAIL PROTECTED]> writes: Elio> I finally noticed that in all the places where no rows were returned I Elio> had used a here document to store the SQL in a variable before passing Elio> it to DBI. Does anyone know why using a here document would result in Elio> the SQ

Re: existance of a select statement

2002-09-26 Thread Tkil
> "Chad" == chad kellerman <[EMAIL PROTECTED]> writes: Chad> I want to check to see if the hosts exists. IF it does update Chad> if not insert. Note that some databases have this functionality built-in; MySQL has a REPLACE primitive that does exactly this. In other databases, I typically t

Re: Multiple drivers ?

2002-09-23 Thread Tkil
> "Glen" == Glen Eustace <[EMAIL PROTECTED]> writes: Glen> I am not having much success at getting a Stack Trace. It's not quite as useful, but you might also try using 'strace' or 'truss' or its equivalent on your system -- if nothing else, it should tell you what your program tried to do r

Re: Interesting DBI/alarm()/Solaris problem? !?

2002-08-29 Thread Tkil
> "Joe" == Joe Slagel <[EMAIL PROTECTED]> writes: Joe> We're seeing some very odd behavior with using alarm() around the Joe> DBI->connect() call only on Solaris platforms. It appears that Joe> even though we clear the alarm after a successful connection, for Joe> some reason the alarm signa