if statement - Is it possible to use IF(cond1 AND cond2,result,else result) in MySQL? -


i want update query if consecutive 5 column have 0 value. first idea is:

update `table_name`  set `count` = if(`col1`=0.00 ,                   `col2`=0.00 ,                   `col3`=0.00 ,                   `col4`=0.00 ,                   `col5`=0.00,  count+1, count) 

but think using , in if condition isn't work. idea? before

using and in if valid, grijesh suggets, using condition in where clause usual way it.

your query though shouldn't give errors.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -