SELECT request.id, request.date, request.type, request.status,
faculty.f_name, faculty.l_name, action.id, faculty.id FROM request INNER
JOIN
faculty ON request.requested_by=faculty.id LEFT JOIN request ON
action.request_id=request.id;




Chris Toth <[EMAIL PROTECTED]> wrote:

I'm trying to form a select statement that will match up all relevent data
from a database for a trouble-ticket system. The select statement below is
the only way I can figure out how to do it. However, the last line " AND
action.request_id=request.id" worries me, because what if there are no
actions yet? Even if there are no actions, I still want to display
everything and just leave the action section blank. Is there a way to do
this?

Thanks



"SELECT request.id, request.date, request.type, request.status,
faculty.f_name, faculty.l_name, action.id, faculty.id FROM request,
faculty, action WHERE request.requested_by=faculty.id AND
action.request_id=request.id";








---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to