Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Re: Prepared query not accepting || instruction at execution

by jpfarmer (Pilgrim)
on Dec 28, 2002 at 16:02 UTC ( [id://222743]=note: print w/replies, xml ) Need Help??


in reply to Re: Prepared query not accepting || instruction at execution
in thread Prepared query not accepting || instruction at execution

No, just 'Y' or 'N'. I'm trying to select fields that match either 'Y' or 'N'.

Replies are listed 'Best First'.
Re: Re: Re: Prepared query not accepting || instruction at execution
by CountZero (Bishop) on Dec 29, 2002 at 09:18 UTC

    In that case you will need two placeholders: one for the 'Y' and one for the 'N'.

    Using placehodlers will do all the quoting internally for you. This means that your filterstring will be quoted in such a way that it is no longer a boolean operation but a single string to be matched against. Hence, the empty recordset as a result.

    If for reasons internally to the logic of your program, you need the filterstring to be modifiable (e.g. sometimes 'OR' or 'AND' or more or less arguments, ...) then the only solution is to put the SQL string together yourself and not rely on placeholders.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-03-28 15:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found