in reply to Using placeholders in SELECT LIKE %...% statement

Try

... "LIKE ? " . ... $sth->bind_param(1, "%$this%"); ...

Replies are listed 'Best First'.
Re^2: Using placeholders in SELECT LIKE %...% statement
by ikegami (Patriarch) on Feb 08, 2010 at 05:28 UTC
    More like
    ( my $escaped_this = $this ) =~ s/%/%%/g; $sth->bind_param(1, "%$escaped_this%");
Re^2: Using placeholders in SELECT LIKE %...% statement
by Zettai (Acolyte) on Feb 06, 2010 at 05:47 UTC
    Thank you!!!