I have a very simply query like this:
SELECT users.id, COUNT(others.id) as c
FROM users JOIN other ON users.id=others.user_id
GROUP BY users.id
What I would like to do is to replace the number in c with '' when c=0.
For example, instead of a row like
# I have this
1, 0
2, 1
# I want c=0 replaced with ''
1, ''
2, 1
How can I do this in MySQL?
Try this: