I am doing a SQL query to bring users, but I consult 2 tables: users and users_vip
No users have all users and users_vip only those that are vip (active or not).
When I make my query joining the 2 tables it only brings who has a registration in vip, because I use the WHERE u.id = uv.iduser, the query looks like this:
SELECT uv.status, u.id, u.name, u.username, u.email, uv.datapedido, uv.dataconfirm, uv.datafinal
FROM euk_users u, euk_users_vip uv
WHERE u.id = uv.iduser
If I have 10 regular users and 1 VIP, the query will only bring this 1 VIP.
I wanted to query it also bring users who are in users but are not in users_vip, with missing data blank, at zero, or something like that. How can I do this?