Fixed foreign key in pages for MySQL