2
I am recovering from the database all expired tickets, 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
However I need to check if all status is 1 (means paid), if there is at least one user with 0:119 already invalid. I tried using array_unique, but it will check all users and I will not know which one did not pay all.
I don’t get it. This way
0:118 0:119 0:119
does not correspond toSELECT user,status,hash
... Could clarify?– Diego Rafael Souza
This output is to explain better the structure, in PHP I loop (foreach) and structured status:user just to explain better. Basically if any user has 0:user is already invalid, it is only valid if all are 1:user.
– Alexander