Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re^3: DBI search for forward slash

by Corion (Patriarch)
on Nov 08, 2020 at 03:08 UTC ( #11123490=note: print w/replies, xml ) Need Help??

in reply to Re^2: DBI search for forward slash
in thread DBI search for forward slash

But = only compares for identity. You want LIKE, and you want the % placeholder:

SELECT * FROM `texts` WHERE `string` LIKE '%/a/b/c%'

... or, with placeholders:

SELECT * FROM `texts` WHERE `string` LIKE ?

(and then in the ->execute() call, add the placeholders to your search string)

Replies are listed 'Best First'.
Re^4: DBI search for forward slash
by luxs (Beadle) on Nov 08, 2020 at 03:33 UTC
    LIKE is fail as well

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11123490]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2023-12-07 07:11 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (32 votes). Check out past polls.