whats wrong with this query ??
Posted: Mon Jan 28, 2008 5:51 am
Hello forums !!
I am getting problems in this query :
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
I am getting problems in this query :
Code: Select all
"SELECT IF(COUNT(*) > 0, COUNT(*), 0) AS total FROM table1 WHERE field1 = 'some_value' GROUP BY field2"Can anbody help what went wrong in above query ?
thanks in advance to all of you