Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: DBI and like statment

by yakko (Friar)
on May 19, 2001 at 07:33 UTC ( #81682=note: print w/replies, xml ) Need Help??


in reply to DBI and like statment

dunno if your DBD you're using can support placeholders, but if it does, you can do:
my $sql = "select title from $TABLE2 where astype like ?"; ... $sth->execute("%$query") or die "Cannot execute: " . $sth->errstr();

(update: chromatic advised me that I can't use placeholders for the table name. Fixed.)
(update2: chipmunk says that I can't use placeholders as part of a value. Well, the intention was right, but I guess I got this one COMPLETELY WRONG! Fixed that, too. Go upvote the other replies instead :o)

--
Me spell chucker work grate. Knead grandma chicken.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://81682]
help
Chatterbox?
[choroba]: timestamps are hard
[1nickt]: not all all yet
[1nickt]: the stable subversion of each major version on the platform I have in my hands most of the day
[Tux]: choroba can't you up the default stack size to 17?
[1nickt]: and I will maybe add the other subversions
[1nickt]: I am on MacOSX and there is a sore lack of testing resources for CPANTS I think
[choroba]: Tux Why? It works for me with 16 :-)
[Tux]: and the defailt is 15?

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2017-09-19 20:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (228 votes). Check out past polls.

    Notices?