I'm retrieving all the expired tickets from the database, with the following query
SELECT user,status,hash
FROM ticket
WHERE datepay < date_add(now(), interval -1 month) AND user = '119'
The result is as expected, as below. It reads status:usuário
0: 118 0: 119 0: 119
But I need to check if all statuses are 1 (means paid), if there is at least one user with 0: 119 already invalid. I have tried to use array_unique, however it will check all users and I will not know which did not pay all.