Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Perl/MySQL Problem

by vagnerr (Prior)
on Feb 23, 2002 at 16:47 UTC ( [id://147076]=note: print w/replies, xml ) Need Help??


in reply to Perl/MySQL Problem

I think your problem is that you need to tell SQL what you mean more specificaly. Right now you have
... WHERE <condition1> OR <condition2> OR <condition3> AND <condition4 +>
like this if conditions 1 or 2 are true 3 and 4 won't even be checked as they are irrelivent you already have a true try re-writing your statement with brackets, something like this.
... WHERE (<condition1> OR <condition2> OR <condition3>) AND <conditio +n4>
Written like this its saying any of the first 3 conditions may be true but must be combined with condition 4 being true (ie you active state check).
Hope this helps

---If it doesn't fit use a bigger hammer

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-19 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found