Please am trying to select data from database table and join it with users table, but my problem is when the username in table one not exist in table two it will not get any data.
I want a query that can ignore if the username doesn't exist in the other table, because in table for users i don't have any username that is stored as QUEST but in comment i have people that didn't login username saved as QUEST how do i do this?
Here is my query
$snp_db->prepare("SELECT * FROM comment snp
INNER JOIN users us
ON snp.snpauthor = us.username
WHERE keyname = :publicKey");
This only work when the username exist in but table. I want it to get it once the publicKey value exist in comment table