MySQL Forums
Forum List  »  Oracle

How can I get the whoami into a query using DBI
Posted by: jim hufford
Date: September 20, 2004 03:56PM

use DBI;
my $dbh = DBI->connect('DBI:Oracle:', $ENV{'SCPDB'})
or die "Couldn't connect to database: " . DBI->errstr;
my $sql= qq(delete FROM <table_name> WHERE user_id = '$user');
my $sth = $dbh->prepare($sql) or
die "Couldn't prepare statement: " . $dbh->errstr;
$sth->execute();
$dbh->disconnect;

I need to get the correct unix user sign on in the field so I can remove the entries when the user quits out of the application. I took out the table name in this example.

Options: ReplyQuote


Subject
Views
Written By
Posted
How can I get the whoami into a query using DBI
4586
September 20, 2004 03:56PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.