I have 2 MYSQL tables first table name Users and second table name images
I want to margin 2 tables in one by FOREIGN KEY id but some users doesn't have imageurl_id how can i display all of them like this . and if there are no images i got empty image list
i tried this but it not working
static async get() {
return new Promise((resolve) => {
db.execute("SELECT * FROM users,images where users.id = image.imageurl_id ", [], (error, result) => {
if (!error) resolve(result);
});
});
}