heloo everyone, i am new to mysql and php. here i am diplaying my data by joining 3 tables.what this query is doing
1) displaying course name
2) displaying subject name
3) displaying status if any
there are three statuses (applied, accepted, rejected)
what i want to display is
1) course name
2)subject name
3)donot display the status if is is accepted.
after putting condition of != in SELECT query it doesnot show any accepted status but it doesnot remove the whole row instead its showing the whole row with no status and a blank space where it was showing accepted
how i can solve this problem,, hope i explained my question clearly any kind of help will be appreciated, thanx in advance :) here's my code
$result = mysql_query("SELECT courses.id AS cid, courses.title, courses.subjectsid, subjects.id AS sid, subjects.subjectname, requestrecord.status
FROM courses JOIN subjects ON courses.subjectsid = subjects.id
LEFT JOIN requestrecord
ON courses.id = requestrecord.coursesid AND requestrecord.accountsid=".$_SESSION['id']." AND requestrecord.status!='accepted' ");
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^