perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <gyo...@laserlink.net>
Subject RE: error DBI with quote
Date Wed, 05 Jul 2000 18:48:44 GMT
this more properly belongs on the DBI list, but see page 122 of the cheetah
book:
 
"Bind values are passed to the database seperately from the SQL statement,
so there's no need to 'wrap up' the value in SQL quoting rules."
 
thus, no need to call quote()...
 
HTH
 
--Geoff

-----Original Message-----
From: Jesús Lasso Sánchez [mailto:jlasso@ya.com]
Sent: Wednesday, July 05, 2000 2:27 PM
To: modperl@apache.org
Subject: error DBI with quote


Hi,
 
  I have a problem with DBI and Oracle. I have an input form where i insert
a phrase like 
 
      "Mike's car"
 
 when i try to do the insert, it produces an error: "not valid sentence".
this is the code:
 
      $sql=qq{INSERT INTO TABLE_NAME (PHRASE) VALUES (?)};
      my $insert_phrase=$dbh->prepare($sql);
      $sql->bind_param(1,$dbh->quote($phrase),SQL_VARCHAR);
      $insert_phrase->execute();
 
Anybody know something about this
 
  thanks
 
______________________________________
Jesús Lasso - Ya.com Internet Factory
jlasso@ya.com <mailto:jlasso@ya.com> 
www.ya.com <http://www.ya.com>  - www.globalya.com <http://www.globalya.com>



Mime
View raw message