purge has asked for the wisdom of the Perl Monks concerning the following question:
doesn't work, gives me DBD::Oracle::db selectrow_array failed: ORA-00900: invalid SQL statement (DBD ERROR: OCIStmtExecute) but.. should I take an exact copy of the string $sql (I've even done an ascii comparison on it) and set it inside the subroutine, it works perfectly well, i.e:getData{ $sql = shift; my ($total_cols) = $dbh->selectrow_array($sql) or die($dbh->errstr); ...
its driving me mad.. help!getData{ $sql = shift; $sql = "SELECT COUNT(*) etc blah blah"; my ($total_cols) = $dbh->selectrow_array($sql) or die($dbh->errstr); ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: when is a string not a string?
by tachyon (Chancellor) on May 03, 2002 at 10:41 UTC | |
by purge (Acolyte) on May 03, 2002 at 11:05 UTC | |
by Sidhekin (Priest) on May 03, 2002 at 13:36 UTC | |
by Anonymous Monk on May 03, 2002 at 16:20 UTC | |
by graff (Chancellor) on May 03, 2002 at 16:41 UTC | |
by purge (Acolyte) on May 07, 2002 at 08:47 UTC | |
by Sidhekin (Priest) on May 07, 2002 at 10:37 UTC | |
by tachyon (Chancellor) on May 03, 2002 at 12:14 UTC | |
|
Re: when is a string not a string?
by bjelli (Pilgrim) on May 03, 2002 at 12:12 UTC |