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=project.id) or (select count(*) as total fro' at line 4

select project.id as pid, project.project_title as project_title from project,project_status,project_status_link,escrow where ((select count(*) as total from project_owner where project_owner.user_id = and project_owner.project_id=project.id) or (select count(*) as total from project_begins where project_begins.bidder_id= and project_begins.project_id=project.id)) and (select count(*) as total from dispute where project.id = dispute.project_id) <= 4 and project_status_link.project_id = project.id and project_status_link.status_id = project_status.id and project_status.name = 'Closed' and escrow.project_id = project.id and escrow.status = 'Pending' and escrow.amount >= 30