Are you getting an error message? What is it? Can't see anything wrong by
just looking at it and "won't work" is usually not enough to detect a
problem. Please post more info.
Ilya Sterin
-----Original Message-----
From: Nico van Leeuwen [mailto:[EMAIL PROTECTED]]
Sent: Sunday, May 13, 2001 11:27 PM
To: [EMAIL PROTECTED]
Subject: Oracle Selects ??
The following code would work fine for me using mysql... for oracle it
won't work and I have been trying real hard to find out why but it won't
work.
I have checked the SQL in SQL*PLUS and it worked fine!
dbh->do seems to be working fine too....
Thanks in advance,
Nico.
#!/usr/bin/perl -w
# Set variables
use DBI;
$ENV{ORACLE_HOME} = "/opt/oracle/product/8.1.7";
$dbh = DBI->connect('dbi:Oracle:','[EMAIL PROTECTED]','systime');
# Prepare Select
$sth = $dbh->prepare("SELECT id, is_admin, aktiv, passwort FROM vo_user
WHERE login='nicovl'");
# Execute the Select
($sth->execute);
@dbdata = $sth->fetchrow_array;
$userid = $dbdata[0];
$isadmin = $dbdata[1];
$aktiv = $dbdata[2];
$passwortdb = $dbdata[3];
print "$userid\n";