This is wrong:
WHERE WEEKDAY(users.date_created) = 'WEEKDAY(WEEKDAY(NOW()))'
Example:
select
@wd:=WEEKDAY(curdate()) wd,
@str:='WEEKDAY(WEEKDAY(NOW()))' str,
@wd=@str,
@wd=WEEKDAY( now() ) ;
Results:
+------+-------------------------+----------+----------------------+
| wd | str | @wd=@str | @wd=WEEKDAY( now() ) |
+------+-------------------------+----------+----------------------+
| 2 | WEEKDAY(WEEKDAY(NOW())) | 0 | 1 |
+------+-------------------------+----------+----------------------+
In your query you are comparing week day value with a literal string 'WEEKDAY(WEEKDAY(NOW()))'
. As they do not match, it returns a false and hence you see wrong results.
To check if the week day of the column with week day of now, then
Change:
WHERE WEEKDAY(users.date_created) = 'WEEKDAY(WEEKDAY(NOW()))'
To:
WHERE WEEKDAY(users.date_created) = WEEKDAY( NOW() )