A Database Error Occurred

Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and project_owner.project_id=dispute.project_id) or (select count(*) as t' at line 11

select dispute.id as did, dispute.description as description, dispute.date_time as date_time, user.username as username, user.id as uid, project.project_title as project_title, dispute_status.status as status, dispute.percent as percent, project.id as pid from dispute,dispute_user_link,dispute_status,dispute_status_link,user,project where ((select count(*) as total from project_owner where project_owner.user_id = and project_owner.project_id=dispute.project_id) or (select count(*) as total from project_begins where project_begins.bidder_id = and project_begins.project_id=dispute.project_id)) and dispute_status_link.status_id = dispute_status.id and dispute_status_link.dispute_id = dispute.id and dispute_user_link.dispute_id = dispute.id and dispute_user_link.user_id = user.id and dispute.project_id = project.id and dispute_status.status <> 'Finished'