in reply to DBI: when 1 != '1'

I spent a while chasing down a "bug" related to this, which I related in DBD::mysql Unusual Behavior, and thankfully solved by Re^2: DBD::mysql Unusual Behavior. It's one of those things that I really wish they would fix. I've patched the driver here so it works, but I have no idea how much collective head is being banged against metaphorical wall out there. Surely I'm not alone.

Is there any way to tell DBI how to quote things? It's really quite awful at guessing sometimes.

Replies are listed 'Best First'.
Re: Re: DBI: when 1 != '1'
by IlyaM (Parson) on Sep 28, 2002 at 09:56 UTC
    Is there any way to tell DBI how to quote things? It's really quite awful at guessing sometimes.

    In theory one can use $sth->bind_param to tell type which has variable to be inserted in place of placeholder so DBI has a chance to do proper quoting. In reality I'm not sure that it works for anything other than Oracle. At least I've never seen it being used with DBI drivers other than DBD::Oracle.

    --
    Ilya Martynov (http://martynov.org/)