Re: How to store query results in an array?

2005-05-25 Thread Jared Still
Here's a fun and slightly obfuscated method to do that: my $usql=q{select username from dba_users}; my $aryRef = $dbh->selectall_arrayref($usql); my @users = map { $aryRef->[$_][0] } 0..$#{$aryRef}; my $newSql = q{select from users where username in ('} . join(q{','},@users) . q{')}; print "$

Re: problem with DBD::Oracle

2005-05-25 Thread Michael A Chase
On 05/25/2005 04:46 AM, Malka Cymbalista said: Our web server is running Apache 2.0.48 with mod_perl 1.99_12 on a Sun machine running Solaris 9. We are running perl 5.8.1, DBI 1.39 and DBD-Oracle 1.16. We are trying to connect from our web server to an Oracle database that is on a different mac

RE: How to store query results in an array?

2005-05-25 Thread Job Miller
if the second query is an Oracle, you can query across to almost all other databases from an Oracle connection if you set it up. http://www.oracle.com/technology/products/oracle9i/datasheets/gateways/gateway_rel2_ds.html or iterate over the first result set inserting rows into a global temp t

DBD::Oracle patch

2005-05-25 Thread gray . perl
Had to apply this patch to get DBD::Oracle to work on my RedHat FC3 system which installed the include files over in /usr/include/oracle/version-#/... Thanks much for the package. *** Makefile.PL.ORG Fri Oct 22 02:07:04 2004 --- Makefile.PL Wed May 18 14:56:46 2005 *** *** 1250,1

RE: How to store query results in an array?

2005-05-25 Thread ricardd
Hello, I forgot to mention, the first query is from a different database than the second one. Unfortunately, a subquery is not an option. D > Daniel, > > Why not use a subquery? It'll be more efficient than using the array. > > Something like "SELECT * FROM ... WHERE ... IN (SELECT ...)"; > > >

Re: [cgiapp] Re: Yet another callback system proposal

2005-05-25 Thread Ron Savage
On Wed, 25 May 2005 13:17:09 -0400, Michael Graham wrote: Hi Michael > Anyway, as much as possible we're trying to make the architecture > of the framework transparent and let people write normal > CGI::Application programs (including cgiapp_init, cgiapp_prerun, > etc.) without interference. Ob

Re: [cgiapp] Re: Yet another callback system proposal

2005-05-25 Thread Ron Savage
On Wed, 25 May 2005 14:40:49 -0400, Cees Hek wrote: Hi Cees > I'm not 100% which 'it' you are referring to here. I would > consider the LogDispatch plugin ready for production use. If I > still have a disclaimer in the docs about stability, I will remove > it in the next distribution, as I hav

RE: How to store query results in an array?

2005-05-25 Thread Fong, Anna
Daniel, Why not use a subquery? It'll be more efficient than using the array. Something like "SELECT * FROM ... WHERE ... IN (SELECT ...)"; HTH, Anna -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 25, 2005 11:40 AM To: dbi-users@perl.org

How to store query results in an array?

2005-05-25 Thread ricardd
Hello dbi-users, I'm relatively new to Perl DBI so bear with me as this might be very simple for the gurus. I would like to use the results of a query as an input to another query's WHERE ... IN clause. This is simple enough but I can't figure out how to avoid extracting and formatting each row fr

Base class package "DBI::db" is empty

2005-05-25 Thread Ford, Richard
Currently running the following code snippet: package DBIOracle; use base 'DBI'; package DBIOracle::db; use base 'DBI::db'; On a linux box running perl v5.6.1 built for i686-linux there are no issues. However, on a Solaris box running perl 5.005_01 built for sun4-solaris I get the following error:

RE: problem with DBD::Oracle

2005-05-25 Thread Reidy, Ron
Well, to start, you should **always** print the Oracle error message ($DBI->errstr). This will tell you more than we on this list could even hope to guess. Next, if it runs from the command line, then you most likely have a permissions issue with either the Perl script itself, or the Oracle.so

RE: DBI->disconnect is not a DBI method. Read the DBI manual. at ff.pl line 224

2005-05-25 Thread Ronald J Kimball
Matthew Persico [mailto:[EMAIL PROTECTED] wrote: > Turns out I was wrong - I got my test scripts crossed. Removing the () > did not fix the problem. That's not too surprising, as removing the parentheses does not change the semantics of the code at all: % perl -MO=3DDeparse,-p -e '$dbh->disconn

problem with DBD::Oracle

2005-05-25 Thread Malka Cymbalista
Our web server is running Apache 2.0.48 with mod_perl 1.99_12 on a Sun machine running Solaris 9. We are running perl 5.8.1, DBI 1.39 and DBD-Oracle 1.16. We are trying to connect from our web server to an Oracle database that is on a different machine. The script that we wrote to do this runs p