martian2k4 — 2010-02-20T15:47:36-05:00 — #1
Hey i'm writing a script at the moment and i need to write a query which will work like this
SELECT * FROM
field_1 = 'somthing'
field_1 = 'somthing_else'
field_3 = 'keyword'
I hope that makes sense. I've never used IF statements in mysql before and i can't find much documentation that helps.
dan_grossman — 2010-02-20T21:41:12-05:00 — #2
I don't think you can do that. What you CAN do is outer join all the tables you might need, and use conditionals in the column list to do whatever you were trying to do here.
martian2k4 — 2010-02-21T15:53:12-05:00 — #3
Got it working now, Cheers
superball — 2010-04-03T05:47:07-04:00 — #4
Can you post your query which works coz I have the same problem and did try it with outer join...but it isnt working...