Do you have any objection to using placeholders? (mysql and Oracle both
support)
Change your prepare and your execute to:
$sth = $dbh->prepare("SELECT username FROM users WHERE email = ?");
if ($sth && $sth->execute($email)) {....
-----Original Message-----
From: Matthew Harrison [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 3:14 PM
To: [EMAIL PROTECTED]
Subject: change from mysql to oracle
I currently use DBD::MySQL in my script like so:
<snip>
$dbh=DBI->connect("DBI:mysql:database=mydatabase;host=127.0.0.1;port=3306",m
yuser,mypass);
die "Could not connect to database" if !$dbh;
$sth = $dbh->prepare("SELECT username FROM users WHERE email= '$email'"); if
($sth && $sth->execute()){
@results = $sth->fetchrow_array();
}
</snip>
If i wanted to start using Oracle 8i, what would I have to change? I have
just install DBD::Oracle.
--
Matthew Harrison
Internet/Network Services Administrator
Genstate
www.genestate.com