Hello forums!
I am getting problems in this query :
"SELECT IF(COUNT(*) > 0, COUNT(*), 0) AS total FROM table1 WHERE field1 = 'some_value' GROUP BY field2"
if there is no result the query is supposed to give 0 value but it gives nothing.
Can anbody help what went wrong in above query?
thanks in advance to all of you