You really need error checking.  I suggest you add { RaiseError => 1 } after
the password in the connect() call.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
----- Original Message -----
From: "Nico van Leeuwen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, May 13, 2001 20:27
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";


Reply via email to