mysql query if else statemnet?

Posted by user253530 on Stack Overflow See other posts from Stack Overflow or by user253530
Published on 2010-03-14T20:10:39Z Indexed on 2010/03/14 20:15 UTC
Read the original article Hit count: 184

Filed under:
|

I have this sql query:

SELECT S.SEARCH, S.STATUS, C.TITLE AS CategoryName, E.SEARCH_ENGINES AS Engine, S.RESULTS, S.DATE, S.TOTAL_RESULTS AS Total, S.ID

FROM PLD_SEARCHES AS S Join PLD_CATEGORY AS C ON C.ID = S.CATEGORY_ID Join PLD_SEARCH_ENGINES AS E ON S.SEARCH_ENGINES_ID = E.ID ORDER BY S.DATE ASC

I want to identify if S.STATUS is either 1 or 0 and according to those values to return COMPLETE or PENDING in the query results

© Stack Overflow or respective owner

Related posts about mysql

Related posts about sql