Angelo Marcos Rigo wrote:
> Hi!
>
> I have a oracle database in a windows 2000 machine
> and other machine with linux/apache webserver,
>
> i want to acess that oracle/windows machine from this linux webserver
> let my users authenthicate and then see their data stored at this oracle,
> in my company website.
>
> It can be done? there is more than one way to do that?
> actually just one way will be great.
>
> Thank�s in advance
>
############ http://www.saturn5.com/~jwb/dbi-examples.html
use strict;
use DBI;
my $dbh = DBI->connect( 'dbi:Oracle:testdb','USERNAME','PASSWORD',)
|| die "Database connection not made: $DBI::errstr";
my $sql = qq{ SELECT table_name FROM all_tables where owner = 'USERNAME' };
# Prepare and execute SELECT
my $sth = $dbh->prepare($sql);
$sth->execute();
my($tname); # Declare columns
$sth->bind_columns(undef, \$tname);
print "List of tables: \n";
while( $sth->fetch() ) # Fetch rows from DB
{
print "$tname\n";
}
$sth->finish(); # Close cursor
$dbh->disconnect;
--
It's lucky you're going so slowly, because you're going in the wrongdirection.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]