flyadvertising
Programmer
Having a problem combining 2 JOINS. Both statements below work. I have also included the relevant fields in the 2 DBs. My question is:
1) How do I combine the 2 statements into 1 statement?
2) How do I reference the rows in my php to distinguish if the result was from the mmpreID JOIN or the mmparID JOIN?
Thanks
DB: matchmaker
mmpreID
mmparID
DB: users
uID
ufname
ulname
SELECT matchmaker.mmpreID, matchmaker.mmparID, users.uID, users.ufname, users.ulname
FROM matchmaker
LEFT JOIN users ON matchmaker.mmparID = users.uID
SELECT matchmaker.mmpreID, matchmaker.mmparID, users.uID, users.ufname, users.ulname
FROM matchmaker
LEFT JOIN users ON matchmaker.mmpreID = users.uID
1) How do I combine the 2 statements into 1 statement?
2) How do I reference the rows in my php to distinguish if the result was from the mmpreID JOIN or the mmparID JOIN?
Thanks
DB: matchmaker
mmpreID
mmparID
DB: users
uID
ufname
ulname
SELECT matchmaker.mmpreID, matchmaker.mmparID, users.uID, users.ufname, users.ulname
FROM matchmaker
LEFT JOIN users ON matchmaker.mmparID = users.uID
SELECT matchmaker.mmpreID, matchmaker.mmparID, users.uID, users.ufname, users.ulname
FROM matchmaker
LEFT JOIN users ON matchmaker.mmpreID = users.uID