Hi Damian,
Yes, there is a better way of doing this. It is a database relationship of one-to-many (one student has many files, and one file is owned by exactly one student). This would look like:
(File_ID is an auto-increment unique primary key)
File_ID | Student_ID | OTHER INFO
0000001 00000001 title and description stuff
0000002 00000001
0000003 00000002
0000004 00000001
0000005 00000002
0000006 00000003
This way you have your primary key index uniquely identifying, while still being able to limit the Student_ID in searches for specific students.
I have no idea if this is related to the problem you are having, but it can never hurt to practice good database design.
Good luck,
Jason