Thursday, 6 February 2014

Mysql query how to use if condition?

inside mysql query add this

  SELECT  IF( viewers > 100 , 1, 0) AS hotproduct FROM mytable
the condition is like this


IF ( condition here , true , false )

No comments:

Post a Comment