Hi,
the goal is to retrieve the number of users in one table which have:
- field EXPIREDATE > CURRENT_TIMESTAMP as nUsersActive
- field EXPIREDATE < CURRENT_TIMESTAMP as nUsersExpired
- field EXPIREDATE IS NULL as nUsersPreregistered
all with one query, and the result should for example be
nUsersActive nUsersExpired nUsersPreregistered
10 2 15
this will later be json_encoded and passed to an ExtJS script for displaying.
Any hint? I tried several times without succeding. I tried with the UNION statement, I get the right numbers, but of course in column, while I need them in row.
Thanks for your support.