In trying to solve my original problem, I've ran into new ones.
The code below contains MySQL commands I've never used before. I read about them on mysql.com and I think I'm using them correctly, but I get nasty errors.
Here's the code:
/begin query
$query="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";
$result=mysql_query($query);
//begin while loop to grab all needed data out of the database
while ($query_data=mysql_fetch_array($result)) {
...
And here's the nasty error:
You have an error in your SQL syntax near 'ON request.requested_by=faculty.id LEFT JOIN request ON action.request_id=reque' at line 4
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
Warning: Supplied argument is not a valid MySQL result resource in /usr/local/etc/apache_1.3.12/htdocs/test/rfatest/rfadisplay.php on line 58
My guess is that I'm not using mysql_fetch_array correctly, but I could be wrong.
If anyone sees a problem with the above code, let me know.
Thanx
The code below contains MySQL commands I've never used before. I read about them on mysql.com and I think I'm using them correctly, but I get nasty errors.
Here's the code:
/begin query
$query="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";
$result=mysql_query($query);
//begin while loop to grab all needed data out of the database
while ($query_data=mysql_fetch_array($result)) {
...
And here's the nasty error:
You have an error in your SQL syntax near 'ON request.requested_by=faculty.id LEFT JOIN request ON action.request_id=reque' at line 4
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
Warning: Supplied argument is not a valid MySQL result resource in /usr/local/etc/apache_1.3.12/htdocs/test/rfatest/rfadisplay.php on line 58
My guess is that I'm not using mysql_fetch_array correctly, but I could be wrong.

If anyone sees a problem with the above code, let me know.
Thanx