that would work if it where a little insert but this is what the insert
looks like

$SQL_UP = qq`
  Insert into $DB_Table
(firstname,lastname,title,phone,email,age,location,address,address2,city,sta
te,zip,zip2,inst,school_type,grades_taught,subjectarea_1,subjectarea_2,subje
ctarea_3,subjectarea_4,subjectarea_5,subjectarea_6,how_heard,Occupation)

  Values
('$firstname','$lastname','$title','$phone','$email','$age','$location','$ad
dress','$address2','$city','$state','$zip','$zip2','$inst','$school_type','$
grades_taught','$subjectarea_1','$subjectarea_2','$subjectarea_3','$subjecta
rea_4','$subjectarea_5','$subjectarea_6','$how_heard','$Occupation')`;

----- Original Message -----
From: "PURMONEN, Joni" <[EMAIL PROTECTED]>
To: "'borakovej'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, July 18, 2001 6:59 AM
Subject: RE: Think there is something DBI


> 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]
>
>


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

Reply via email to