in reply to DBI mysql substring_index syntax error

Use placeholders whenever possible, use ->quote() everywhere else.

This would take care of all escaping issues for you, and make you invulnerable against SQL injection attacks.

-- FloydATC

Time flies when you don't know what you're doing

Replies are listed 'Best First'.
Re^2: DBI mysql substring_index syntax error
by Rodster001 (Pilgrim) on Oct 22, 2014 at 06:32 UTC
    But, there are no variables in this query :) I agree with you, I always use placeholders.
      Yes, which means that you don't need interpolation and that you could use a differfent quoting mechanism.

      I can't test it, but using q instead of qq with your original string should probably be sufficient. Or you could possibly use the quotemeta function to get the escaping right.