Code:
SELECT Project_id, Event_id FROM event WHERE Event_id = 27 AND Project_id = <your_project_id>;
Just replace <your_project_id> with whatever project id variable you have. Note that while SQL commands (select,where, from) are case insensititve, table names and fields are case sensitive.