EbrahemSamer
3 months ago
406
1
General

How to use Inner join right.

Posted 3 months ago by EbrahemSamer

I've two tables ( users, notifications ) and I am getting all notifications that related to any user.

ex: username , usertype, notification_type ......

no relation between them....

I am using inner join but it does not get all notifications just get some ....

-- query

SELECT notifications.user_id, notifications.type, notifications.seen, notifications.the_date, users.username, users.user_status, users.points, users.id FROM notifications JOIN users ON notifications.user_id = users.id ORDER BY notifications.seen

some notifications did not appear .... ( No DB Relation between them )

Please sign in or create an account to participate in this conversation.