in reply to DBI and some complicated quotes

You need to look at the section in the DBI documentation called "Placeholders and Bind Values"

my $sth = $dbh->prepare( 'UPDATE table_name SET `fieldname` = REPLACE( + `fieldname`, ?, ? )' ); $sth->execute( q{‘}, q{'} );

...this assuming you're correct when you say it works from the command line. You may have to check your database-specific DBD::* POD to see if there are any particulars you need to know.


Dave

Replies are listed 'Best First'.
Re^2: DBI and some complicated quotes
by tobyink (Canon) on Sep 21, 2012 at 08:59 UTC

    I think you really meant...

    $sth->execute( q{‘}, q{'} );
    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

      Oh....., I suppose. ;) (Updated now)


      Dave