Hi,
I was wondering if the code below would be a good way to trap errors. I grabbed the code off here and tried to fit it into my own code but it doesn't seem to be working:
----//begin query
$query="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";
$result=mysql_query($query);
//trap errors
if (!$result=mysql_query($query))
{
echo mysql_error()."<BR>\n$query<BR>\n";
};
//begin while loop to grab all needed data out of the database
while ($query_data=mysql_fetch_array($result)) {