yep, couple of ways, placeholders being the best ones. Slurp the data into a
string and then

    $sql = qq(UPDATE whatever
                  SET this = ?
                  WHERE id =?);

    $sth=$dbh->prepare($sql);
    $sth->execute($this,$id);

This way you do not need to worry about apostrophes in the strings $this or
$id.

Joni

-----Original Message-----
From: borakovej [mailto:[EMAIL PROTECTED]]
Sent: 18 July 2001 17:31
To: [EMAIL PROTECTED]
Subject: Think there is something DBI 


OK here is an overview of my problem, I am running a script to take a pipe
delimited flat file and pump the data into a database. Due to the users
putting extraneous apostrophes I am getting errors that there are unclosed
apostrophes in the fields. I am looking for a way to escape these
apostrophes  as simply as possible. Can someone help?

Judd Borakove

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to