in reply to Problem with DBI placeholders

Thanks to everyone for their helpful replies on this annoying bug.

I have decided to scrub my data, and to scrub any incoming data to have no trailing/leading spaces.

Cheers

-------------------------------------
Nothing is too wonderful to be true
-- Michael Faraday

Replies are listed 'Best First'.
Re: Re: Problem with DBI placeholders
by etcshadow (Priest) on Jan 28, 2004 at 22:34 UTC
    Yeah, that's how we ended up dealing with it, as well. Another thing is that if you consistently bind all of your literals both going into the database as well as in your queries... you'll never have this problem (because the literals had their trailing whitespace stripped going in, so it's fine if it gets stripped when you query for it, as well).

    And of course, always binding all of your literals (or at least very nearly all of them) is pretty much always the right course. (Excepting of course for some moderately rare conditions which I describe in great detail here.)

    ------------ :Wq Not an editor command: Wq