I have 3 tables in a m2m relationship in a mysql database as follows:
tbltest (test_id, testdescription)
tblprofile (profile_id, profiledescription)
tbltestprofile(testprofile_id,test_id,profile_id)
I need to display test_id and description from the test table where I have no matching records in tbltestprofile and where the profile_id = x
I’ve tried various combinations using NOT IN but without the desired results. Can anyone assist?
Sidenote. It would help if you kept table (and field) names simple and not add the
tblprefix, liketest,profile,testprofile. A simple 3-table join you have probably used:makes me rather dizzy. Wouldn’t it be better like this? Even without aliases: