Can you have foreign key constraints across multiple tables

My Question says it all really, I know Yii uses the comments section in MySQL to help generate relationships in models. I have a foreign keys that are represented in multiple tables, is there a way to get Yii to recognise more than 1 comment when generating relationships.

I’ve tried so far

[sql]CONSTRAINT FOREIGN KEY (id) REFERENCES r_detail(created_by_user), mentions(user_id)[/sql]

Yii just seems to take the last table(column) as the relationship, regardless of what precedes it.

Is it even possible what i’m trying to do?