fixed a missing table query

resolves:
http://support.web2project.net/questions/720/department-project-view-bro
ken-in-31.html